简体   繁体   中英

Are there any info or links that clearly covers paypal integration in react native?

I would like to setup a paypal payment method exactly the same as Airbnb. The payment will be recurring on a monthly basis.

If one user is directly paying another user for a fixed amount that recurs automatically every month between just their accounts (very different from AirBnB's setup), that can be done with a Subscribe button. The easiest integration will be to create a classic HTML-only Subscribe button via https://www.paypal.com/buttons , uncheck the option in Step 2 to save the button at PayPal, and once the code is generated click the link to remove code protection. This will give you a button with variables you can adjust, per HTML Variable for Payments Standard , including the business destination in particular.

Newer PayPal Subscriptions can be used instead, but are more complex to set up, as each user will need to have the appropriate recurring Plan created for them via an API call, and you will need their Client ID and Secret to do that from your server.

Since you are using React Native, it is important to note that all PayPal flowsrequire a web interface that includes an address bar, such as Safari View Controller or Chrome Custom Tab. A WKWebView or similar cannot be used.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM