Paypal Adaptive payment for mobile web

后端 未结 4 634
走了就别回头了
走了就别回头了 2020-12-14 17:54

Im integrating Paypal Adaptive Payment API for a mobile website. But when Im submitting payment to

https://www.paypal.com/webscr?cmd=_ap-payment&paykey=value

4条回答
  •  南方客
    南方客 (楼主)
    2020-12-14 18:15

    The best approach I found was mini browser experience. But I had a variety of different issues on mobile devices implementing it (which is what it was meant for in the first place). You will see many similar questions about adaptive payments and all sorts of issues with using lightbox and mini browser experience.

    But FINALLY... I have figured it out after hours upon hours, days upon days! This should solve everyone's problems of all different varieties when it comes to issues with PayPal Adaptive Payments and the issues with:

    1. The default redirected paypal page is NOT mobile responsive and looks horrible on mobile devices.
    2. The lightbox gets "hung up" and does not close on some mobile devices.
    3. The mini browser doesn't close after completing payment or cancelling.
    4. The mini browser doesn't redirect to the callBackFunction from paypal apdg.js script.
    5. Not redirecting to returnUrl and cancelUrl after payment completion (or when cancelling)
    6. Chrome for ios (iphones) doesn't initiate the callbackfunction and therefore after payment completion or cancellation, it just keeps you at the page you launched the paypal payment page from which prevents you from validating success or failure of payment.

    Drum roll please.... here it is!! This replaces any need for PayPal javascript files etc. All you need is what is below along with your own method of obtaining the PayKey to add to the redirect url. My live website, with adaptive payments working correctly using below code, is https://www.trackabill.com.

提交回复
热议问题