在沙盒中使用信用卡通过 PayPal 付款时,PayPal 不会重定向回客户页面
我正在使用 Paypal 立即购买按钮 和 Sanbox 卖家帐户。 我已经生成了按钮代码并提供了我的网页的返回 URL,但是当我通过没有 PayPal 帐户链接付款并按照所有流程通过信用卡付款时卡片。
在此过程中,我选择继续以访客身份付款,而不使用我的 PayPal 帐户,但在单击付款按钮后,我没有重定向到我提供的返回 URL 页面。
如何解决这个问题:(:(
这是按钮代码:
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" id="paypalForm">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="[email protected]">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="item_name" value="PSYC-OH-METER">
<input type="hidden" name="amount" value="2.00">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="custom" >
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="button_subtype" value="services">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHostedGuest">
<a onclick="validateForm();" > <img alt=""
src="https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif" onmouseover="this.style.cursor='pointer';" /></a>
</form>
i am using Paypal buy now button with Sanbox seller account.
i have generated the button code and provide a Return URL of my web page but when i pay through Don't have a PayPal account link and follow all process to pay through Credit card.
During process i select Continue to pay as a guest and not use my PayPal account but after i click Pay button i am not redirected to my return URL provided page .
how to fix this :(:(
here is the button code:
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" id="paypalForm">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="[email protected]">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="item_name" value="PSYC-OH-METER">
<input type="hidden" name="amount" value="2.00">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="custom" >
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="button_subtype" value="services">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHostedGuest">
<a onclick="validateForm();" > <img alt=""
src="https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif" onmouseover="this.style.cursor='pointer';" /></a>
</form>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是有意的行为。如果交易是访客付款,您需要点击“返回商家”按钮,然后才能重定向到返回网址。
您可以选择通过传递“cbt”参数来更改“返回商家”按钮的措辞。
例如
遗憾的是,使用网站付款标准无法将访客结帐自动重定向到您的返回网址。
如果这对您来说是必须的,您需要集成 PayPal Express Checkout(免费),它总是重定向回您的网站,因为您的网站是“调用最终组”的网站(调用 API完成交易的调用,即 DoExpressCheckoutPayment)。
This is intended behaviour. You'll need to click the "Return to merchant" button before you're redirected to your return URL if the transaction is a guest payment.
You could optionally change the wording of the "Return to merchant" button by passing the 'cbt' parameter.
E.g.
<input type="hidden" name="cbt" value="Click here to complete your purchase">
Unfortunately it's not possible to get guest checkouts automatically redirected to your return URL with Website Payments Standard.
If this is a must for you, you would need to integrate PayPal Express Checkout (free) which always redirects back to your site, since your site is the one 'calling the final sets' (calling the API call which completes the transaction. Namely, DoExpressCheckoutPayment).
当我看到这样的问题时,我首先检查的是请求中传递的 URL。
您在本地运行您的应用程序吗?您是否将本地主机 URL 传递给 PayPal?
您是否向 PayPal 传递了有效的 URL?
When I see problems like this, the first thing I check is the URL that is being passed in the request.
Are you running your application locally? Are you passing a localhost URL to PayPal?
Are you passing a valid URL to PayPal?