簡體   English   中英

貝寶(Paypal)付款可在沙盒上使用,但不能使用實時貝寶(Paypal)嗎?

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

我們在使用貝寶(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>

波紋管是IPN URL,我們在通過沙箱時可以正確接收自定義值: http : //www.website.com/ipn.php

但是我們不確定實時Paypal會發生什么,即使成功交易后,我們也無法返回到我們的網站,甚至無法在ipn.php文件上接收自定義變量。

IPN網址與沙箱相同,其他則一切相同。

當用戶單擊“立即付款”按鈕時,它將在Paypal上重定向您,然后從付款后的Payal重定向到在線Paypal交易的情況下混亂,用戶可以成功付款,但不會重返網站並且IPN不會被點擊返回http://website.com/ipn.php網址以獲取更新信息。

首先, 訪問時顯示“ HTTP 404-File not found”的鏈接( http://www.website.com/ipn.php )。 因此,您被要求將該頁面修改為可用頁面。 您可以轉到鏈接( https://github.com/paypal/ipn-code-samples )以獲取PayPal的最新IPN示例代碼,然后相應地更新到您的IPN腳本頁面。

其次,您可以參考PayPal按鈕HTML變量的鏈接( https://developer.paypal.com/docs/classic/button-manager/integration-guide/ButtonManagerHTMLVariables/?mark=html )。 變量“ return”用於使客戶完成付款后將其重定向到頁面的功能。 變量“ notify_url”是為PayPal IPN設計的,該功能用於向Web服務器的后端通知交易信息。 您可以轉到下面的鏈接以獲取有關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