Issue
I'm developing an iOS app which uses PayPal as a payment platform. Paypal iOS SDK doesn't support my country, so I have to integrate PayPal using REST API.
It was successful until the "order" api call and displaying the PayPal payment window in the webview. However, I am not sure how to return to the app after completing the payment. Usually, in the case of such payment or login services, there is a return URL and I add it to the URLScheme. But I cannot find how to do it in PayPal API.
Is there anyone who can help?🥲
Solution
In the orders create request, set application_context.return_url
to something that will open a review page on your app, which will then proceed to do a capture API call after approval on your app.
If you want to skip the review step, set application_context.user_action
to PAY_NOW
. This will change the text of the last button of the PayPal page to say "Pay Now" rather than the default Continue, and thus correctly inform the user of what their return action is going to do.
Since you mention a webview, note that webviews are not supported by the PayPal checkout page. For the use case of your own app/checkout being in a webview, consider using a popup bridge with the JS SDK or other mechanism to open the PayPal checkout page in a supported browser view (which must have an address bar, so the user can confirm they are actually securely logging into PayPal.)
Answered By - Preston PHX Answer Checked By - Katrina (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.