2016-06-12 62 views
1

首先,我創建了兩種化合物爲貝寶爲如下沙盒測試帳戶:PHP:無法Paypal付款後返回到我的網站

1- [email protected] 2- [email protected] [email protected]

現在我在我的主帳戶上將自動返回功能打開爲ON,我使用的是支付寶,即[email protected]。我的表單看起來像:

<form action='https://www.sandbox.paypal.com/cgi-bin/webscr' method='post' id="frmPayPal" name='frmPayPal'> 
      <input type='hidden' name='business' value='[email protected]'> 
      <input type='hidden' name='cmd' value='_xclick'> 

      <input type='hidden' name='item_name' value='Awesome Stuff'> 
      <input type='hidden' name='item_number' value='0002'> 
      <input type='hidden' name='amount' value='0.99'> 
      <input type='hidden' name='no_shipping' value='1'> 
      <input type='hidden' name='currency_code' value='USD'> 
      <input type='hidden' name='handling' value='0'> 
      <input type="hidden" name="rm" value="2"> 
      <input type='hidden' name='return_method' value='2' /> 
      <input type='hidden' name='cancel_return' value='http://296c6e7b.ngrok.io/clients/ryan/pay.php'> 
      <input type='hidden' name='return' value='http://296c6e7b.ngrok.io/clients/ryan/pay.php'> 
      <img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"> 
     </form> 

現在我可以成功購買,但它不返回到URL。

我通過jQuery

+0

是否有[email protected]沒有自動返回設置? – Efx

+0

我做了,沒有改變..仍然只是顯示收據就是它。 – Volatil3

回答

1

提交表單您需要登錄您的[email protected],並啓用Auto Return for Website Payments就像你在[email protected]如何做。

我怎麼想的?正因爲如此:

<input type='hidden' name='business' value='[email protected]'>

+0

登錄即可付款嗎? – Volatil3

+0

不,您需要登錄帳戶並更改其在我的帳戶概覽配置文件 - >我的銷售工具 - >網站首選項中的設置。你設置的自動返回是在'我@ mail.com'上,所以註銷這個賬戶並登錄'me-facilitator @ mail.com'並設置自動返回true – Efx

+0

嗯,我在這裏設置了原始賬戶,但仍然沒有任何區別。點擊這裏http://296c6e7b.ngrok.io/clients/ryan/pix.php - 點擊網格#4 – Volatil3