Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Setup Paypal Checkout in the application delegate #13

Open
christophe-chausseray opened this issue Sep 16, 2022 · 0 comments
Open

Setup Paypal Checkout in the application delegate #13

christophe-chausseray opened this issue Sep 16, 2022 · 0 comments

Comments

@christophe-chausseray
Copy link
Collaborator

Description

On android, we are setting up the Paypal Checkout in the onCreate of the MainApplication instead of doing the setup through the JS code by using the initPaypal function. To communicate the environment variable to the native code BuildConfig can be used.
It would be great to do the same on the IOS platform like that we would have the same mechanism to setup the PaypalCheckout on both platforms.

Technical Description

Regarding the Paypal Checkout Documentation, it would be possible to setup the PaypalCheckout in the application function of the AppDelegate (https://github.com/keplr-team/paypal-react-native/blob/main/example/ios/PaypalReactNativeExample/AppDelegate.m#L34).

So, we could imagine to transform the setup function in static function (https://github.com/keplr-team/paypal-react-native/blob/main/ios/RNPaypalSDKModule.swift#L12) like that it would be possible to call it directly in the application function.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant