简体   繁体   English

贝宝(Paypal)付款可在沙盒上使用,但不能使用实时贝宝(Paypal)吗?

[英]Paypal payment works on sandbox but not live paypal?

We are facing some issue with paypal business account, under sandbox everything is working fine, bellow is the form we are using for live: 我们在使用贝宝(Paypal)商业帐户时遇到了一些问题,在沙盒下,一切正常,以下是我们用于直播的表格:

<form method="post" action="https://www.paypal.com/cgi-bin/webscr" id="paypalForm"> 
<input type="hidden" value="_xclick" name="cmd">
<input type="hidden" value="email@email.com" name="business">
<input type="hidden" value="1" name="quantity">
<input type="hidden" value="website" name="item_name">
<input type="hidden" value="MDAW" name="item_number">
<input type="hidden" value="0.3" name="amount">
<input type="hidden" value="0" name="shipping">                                
<input type="hidden" value="http://www.website.com/ipn.php" name="notify_url">
<input type="hidden" value="USD" name="currency_code">                                
<input type="hidden" value="http://website.com/orderconfirm.php" name="return">
<input type="hidden" value="12" name="custom">                                                                     <a class="btn btn-primary" href="selectpixel.php"><i class="fa fa-angle-double-left"></i> Back</a>
<button id="btnOrderForm" class="btn btn-success" type="button">Make     Payment via PayPal</button>
</form>

Bellow is the IPN URL where we are receiving custom values correctly while go through sandbox: http://www.website.com/ipn.php 波纹管是IPN URL,我们在通过沙箱时可以正确接收自定义值: http : //www.website.com/ipn.php

But we're not sure what is happening with live paypal, we are not able to go back to our site and not even receive custom variable on ipn.php file even after successful transaction. 但是我们不确定实时Paypal会发生什么,即使成功交易后,我们也无法返回到我们的网站,甚至无法在ipn.php文件上接收自定义变量。

IPN url is same as sandbox and other then that everything is same. IPN网址与沙箱相同,其他则一切相同。

When the user clicks a 'pay now' button, that will redirect you on paypal and then from payal after payment it messed in case of live paypal transaction, the user can pay successfully but it is not returing back to website and IPN is not hit back to http://website.com/ipn.php url for updating information. 当用户单击“立即付款”按钮时,它将在Paypal上重定向您,然后从付款后的Payal重定向到在线Paypal交易的情况下混乱,用户可以成功付款,但不会重返网站并且IPN不会被点击返回http://website.com/ipn.php网址以获取更新信息。

Firstly, your link ( http://www.website.com/ipn.php ) showing "HTTP 404 - File not found" when access. 首先, 访问时显示“ HTTP 404-File not found”的链接( http://www.website.com/ipn.php )。 So, you are quested to modify this page to the available one. 因此,您被要求将该页面修改为可用页面。 You can go to the link ( https://github.com/paypal/ipn-code-samples ) for PayPal's latest IPN sample code, and then update accordingly to your IPN script page. 您可以转到链接( https://github.com/paypal/ipn-code-samples )以获取PayPal的最新IPN示例代码,然后相应地更新到您的IPN脚本页面。

Secondly, you can refer to the link ( https://developer.paypal.com/docs/classic/button-manager/integration-guide/ButtonManagerHTMLVariables/?mark=html ) for the HTML variable for PayPal button. 其次,您可以参考PayPal按钮HTML变量的链接( https://developer.paypal.com/docs/classic/button-manager/integration-guide/ButtonManagerHTMLVariables/?mark=html )。 The variable "return" is for the function to redirect your customers to a page after they finish the payment. 变量“ return”用于使客户完成付款后将其重定向到页面的功能。 The variable "notify_url" is designed for PayPal IPN which is for the function to notify the back end of your web server about the transaction information. 变量“ notify_url”是为PayPal IPN设计的,该功能用于向Web服务器的后端通知交易信息。 You can go to the link below for the detais about PayPal IPN ( https://developer.paypal.com/webapps/developer/docs/classic/ipn/integration-guide/IPNIntro/ ) 您可以转到下面的链接以获取有关PayPal IPN的详细信息( https://developer.paypal.com/webapps/developer/docs/classic/ipn/integration-guide/IPNIntro/

 <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" value="email@email.com"> <input type="hidden" name="lc" value="US"> <input type="hidden" name="item_name" value="Test_Item"> <input type="hidden" name="item_number" value="MDAW"> <input type="hidden" name="amount" value="0.3"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="quantity" value="1"> <input type="hidden" name="return" value="http://website.com/orderconfirm.php"> <input type="hidden" name="notify_url" value="http://website.com/orderconfirm.php"> <input type="hidden" name="button_subtype" value="products"> <input type="hidden" name="cn" value="Add special instructions to the seller"> <input type="hidden" name="no_shipping" value="2"> <input type="hidden" name="weight_unit" value="lbs"> <input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHosted"> <input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> <img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"> </form> 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM