How do I test Paypal subscription buttons with sandbox?

前端 未结 5 1564
旧时难觅i
旧时难觅i 2021-02-01 16:40

after 5 hours of research and reading outdated paypal documentation I finally give up!

I need to test a simple paypal subscription button with the paypal sandbox.

<
5条回答
  •  抹茶落季
    2021-02-01 17:09

    The problem is that you've generated a 'hosted' PayPal button in the live PayPal website, but you're sending this data to the Sandbox.
    Since the hosted_button_id isn't recognized in the Sandbox, it returns an error.

    You'd need to either:

    • Create a non-hosted button, and change the 'action' and 'business' parameters to match Sandbox details
    • Create a new 'hosted' button in Sandbox via www.sandbox.paypal.com > Profile > PayPal Buttons.

    TL;DR: Sandbox is 100% separated from the Live PayPal website. A hosted button generated in Live, doesn't work in Sandbox.

提交回复
热议问题