Paypal Sandbox Testing - Change of URL Endpoint?

2020-07-09 09:32发布

问题:

It seems there are a lot of changes with Paypal Sandbox lately and I am stuck with my testing. Before, we only point to https://www.sandbox.paypal.com/cgi-bin/webscr for Sandbox testing as seen in the code below:

<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" style="padding: 0; margin: 0;">
<input type="hidden" name="cmd" value="_xclick" />
<input type="hidden" name="business" value="your bussiness id" />
<input type="hidden" name="quantity" value="1" />
<input type="hidden" name="item_name" value="your item" />
<input type="hidden" name="item_number" value="1" />
<input type="hidden" name="amount" value="item price" />
<input type="hidden" name="shipping" value="0" />
<input type="hidden" name="no_note" value="1" />
<input type="hidden" name="notify_url" value="Your notify url">
<input type="hidden" name="currency_code" value="GBP" />
<input type="hidden" name="rm" value="2" >
<input type="hidden" name="return" value="your return url">
<input type="image" border="0" name="paypal" src="images/btn_paypal_nl.gif" onClick=""/>
</form>

But now, Sandbox keeps asking me to "Please login to use the PayPal Sandbox features." which I assume means I am using the wrong endpoint given the latest Paypal Sandbox changes.

My questions now are:

  • Does this still work?
  • If yes, "https://www.sandbox.paypal.com/cgi-bin/webscr" is replaced with what?

As of now, I'm assuming that the URL I mentioned above is the only change I need to do. However, I can't find new documentation on what the new URL to submit the form to is. And Paypal doesn't have updated docs about this.

Please help.

Thanks.

回答1:

Yes, the link "https://www.sandbox.paypal.com/cgi-bin/webscr" still work. But, now you have to use your paypal account credential to login to your paypal.developer acount. If you don't have this then just create one here https://developer.paypal.com/webapps/developer/applications/accounts. Your old sandbox login credentials will not work here. But after logging through your paypal account you can import your old sandbox's personal and business account to here.

Create session in new tab by logging using https://developer.paypal.com/webapps/developer/applications/accounts

and if still see sandbox blank page with just sandbox.com name then just clear your cookies and cache an try again.

Hope this will work for you.



回答2:

Please change your cmd value _xclick/ -> _xclick



回答3:

When using features of the paypal sandbox, you must first log in to the developer area at https://developer.paypal.com/ to establish a session there. I usually leave it open in a different tab.


edit

If you had a developer account prior to the recent updates to the developer area, you might have to go in and set up a new sandbox account. I lost access to the sandbox accounts that I had set up, but the API calls still worked.

Check https://developer.paypal.com/webapps/developer/applications/accounts. If you see your old account listed there with a disabled checkbox, or don't see it listed at all, create a new one.