php Paypal 沙盒测试 - 更改 URL 端点?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/15745626/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-25 09:52:54  来源:igfitidea点击:

Paypal Sandbox Testing - Change of URL Endpoint?

phpformspaypalsandbox

提问by Paolo

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/webscrfor Sandbox testing as seen in the code below:

最近 Paypal Sandbox 似乎有很多变化,我一直坚持我的测试。之前,我们只指向https://www.sandbox.paypal.com/cgi-bin/webscr进行沙盒测试,如下面的代码所示:

<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.

但是现在,沙盒一直要求我“请登录以使用 PayPal 沙盒功能”。我认为这意味着鉴于最新的 Paypal Sandbox 更改,我使用了错误的端点。

My questions now are:

我现在的问题是:

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.

到目前为止,我假设我上面提到的 URL 是我需要做的唯一更改。但是,我找不到有关提交表单的新 URL 的新文档。而且 Paypal 没有关于此的更新文档。

Please help.

请帮忙。

Thanks.

谢谢。

采纳答案by Rajinder Chandel

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.

是的,链接“ https://www.sandbox.paypal.com/cgi-bin/webscr”仍然有效。但是,现在您必须使用您的贝宝帐户凭据登录到您的 paypal.developer 帐户。如果您没有这个,那么只需在此处创建一个https://developer.paypal.com/webapps/developer/applications/accounts。您的旧沙箱登录凭据在此处不起作用。但是在登录您的贝宝帐户后,您可以将旧沙箱的个人和企业帐户导入到此处。

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

通过使用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.

如果仍然看到只有 sandbox.com 名称的沙箱空白页面,那么只需清除您的 cookie 并缓存再试一次。

Hope this will work for you.

希望这对你有用。

回答by JiteshNK

Please change your cmd value _xclick/-> _xclick

请更改您的 cmd 值_xclick/->_xclick

回答by Chris Baker

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.

使用 paypal 沙盒的功能时,必须先登录开发者专区https://developer.paypal.com/建立会话。我通常在不同的选项卡中打开它。



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.

如果您在最近更新开发者专区之前拥有开发者帐户,您可能需要进入并设置一个新的沙盒帐户。我无法访问我设置的沙箱帐户,但 API 调用仍然有效。

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.

检查https://developer.paypal.com/webapps/developer/applications/accounts。如果您看到旧帐户在那里列出并带有禁用复选框,或者根本没有看到它,请创建一个新帐户。