PayPal 沙箱 立即购买 问题
我有贝宝沙箱测试帐户。我想创建一个“立即购买”按钮。我正在尝试使用 GWT。 但它甚至无法使用简单的 HTML 表单。它在 HTML 页面上显示“立即购买”按钮,单击该按钮后将重定向到 PayPal 网站。它要求登录购买产品,但之后继续显示消息:您输入的电子邮件地址或密码与我们的记录不符。请再试一次。我正在使用买家用户购买产品。我非常确定用户名和密码。
在这里提供我正在尝试的简单 HTML 表单:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" id="payPalForm">
<input type="hidden" name="item_number" value="1">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="no_note" value="1"><br>
<input type="hidden" name="business" value="[email protected]">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="button_subtype" value="services">
<input type="hidden" name="cn" value="Add special instructions to the seller">
<input type="hidden" name="no_shipping" value="2">
<input type="hidden" name="rm" value="1">
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_paynow_SM.gif:NonHosted">
<input type="hidden" name="variables" value="http://google.com">
<input type="hidden" name="cancel_return" value="http://google.com">
<input type="hidden" name="notify_url" value="http://google.com">
<input type="hidden" name="return" value="http://freelanceswitch.com/payment-complete /">
<input type="hidden" name="currency_code" value="USD">
<input name="item_name" type="hidden" value="Deal Name">
<input name="amount" type="hidden" value="500">
<input type="submit" name="Submit" value="Submit">
</form>
请提出建议。谢谢。
I have paypal sandbox test account. I want to create a 'buy Now' button. I am trying it with GWT.
But its even not working with simple HTML form. It displays a 'Buy Now' button on HTML page and after clicking on it redirects to PayPal site. Where it ask to login to buy product but after that it goes on displaying message: The email address or password you have entered does not match our records. Please try again. I am using buyer user to purchase product. I am pretty sure about the username and password.
Providing here the simple HTML form which I am trying:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" id="payPalForm">
<input type="hidden" name="item_number" value="1">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="no_note" value="1"><br>
<input type="hidden" name="business" value="[email protected]">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="button_subtype" value="services">
<input type="hidden" name="cn" value="Add special instructions to the seller">
<input type="hidden" name="no_shipping" value="2">
<input type="hidden" name="rm" value="1">
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_paynow_SM.gif:NonHosted">
<input type="hidden" name="variables" value="http://google.com">
<input type="hidden" name="cancel_return" value="http://google.com">
<input type="hidden" name="notify_url" value="http://google.com">
<input type="hidden" name="return" value="http://freelanceswitch.com/payment-complete /">
<input type="hidden" name="currency_code" value="USD">
<input name="item_name" type="hidden" value="Deal Name">
<input name="amount" type="hidden" value="500">
<input type="submit" name="Submit" value="Submit">
</form>
Please advice. Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如 Lazarus 指出的那样,您在表单操作中使用了错误的地址。您正在发布到实时 PayPal 服务 - 沙盒就是这样,它是实时 Paypal 的开发版本...为什么沙盒环境不应该询问您信用卡详细信息,否则您将如何测试您的结账流程?
显然,沙箱环境使用虚拟信用卡号码。
无论如何,我相信您的表单操作方法所需的地址是:
https: //www.sandbox.paypal.com/cgi-bin/webscr
您的隐藏字段看起来不错:)
另外,一旦您觉得您的问题已得到解答,请考虑标记答案 - 只需单击大纲'勾选您认为最好的答案。
As Lazarus has pointed out you are using the wrong address for your form action. You are posting to the live PayPal service - The sandbox is what it is, its a dev version of the live Paypal... why shouldn't the Sandbox environment ask you Credit Card details, how else would you test your check out process?
Obviously the sandbox environment uses dummy credit card numbers.
Anyway, I believe the address you need for your form action method is:
https://www.sandbox.paypal.com/cgi-bin/webscr
Your hidden fields look ok :)
Also please consider marking answers once you feel your questions have been answered - just click on the outline 'tick' for whichever answer you feel is best.