Sahil Totala
Sahil Totala

Reputation: 113

How to use paypal JS SDK in flutter application?

I'm trying to use PayPal REST APIs to create an order/transaction, but I'm having trouble getting Apple Pay and Venmo to work. According to their official documentation, the Apple Pay and Venmo buttons are only available through PayPal JS SDK. However, since my application is built on Flutter, I'm unable to integrate the JS SDK in it. I've tried using InAppWebView, which gave me the button UI, but they don't work because the JS code of onPress doesn't work in WebView, as far as I can tell. Is there any other way to add PayPal, Apple Pay, and Venmo with card payment, too?

Note that I can't use Braintree or flutter-paypal-sdk because Braintree doesn't support splitting payments to different people without paying twice, and flutter-paypal-sdk doesn't offer guest checkout, Venmo, or Apple Pay.

Any suggestion or help would be appreciated.

Upvotes: 0

Views: 297

Answers (1)

Preston PHX
Preston PHX

Reputation: 30457

Webviews are not supported by PayPal checkout pages themselves. If you are going to render the JS SDK in a webview, use a popup bridge so it can open a supported browser view on demand.

Upvotes: 1

Related Questions