2015-10-08 55 views
0

貝寶經常性paymnet我用下面的代碼示例實現定期付款:顯示暫停

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<title>Untitled Document</title> 
</head> 
<body> 
<form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" method="post"> 
<input type="hidden" name="cmd" value="_xclick-subscriptions"> 
<input type="hidden" name="business" value="XXXXXX"> 
<input type="hidden" name="currency_code" value="USD"> 
<input type="hidden" name="no_shipping" value="1"> 
<input type="image" src="http://www.paypal.com/en_GB/i/btn/x-click-but20.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"> 
<input type="hidden" name="a3" value="1.00"> 
<input type="hidden" name="p3" value="1"> 
<input type="hidden" name="t3" value="D"> 
<input type="hidden" name="srt" value="6"> 
<input type="hidden" name="src" value="1"> 
<input type="hidden" name="return" value="XXXXXX"> 
<input type="hidden" name="notify_url" value="XXXXXX"> 
<input type="hidden" name="cancel_return" value="XXXXXX"> 
<input type="hidden" name="sra" value="1"> 
</form> 
</body> 
</html> 

當我放置在沙箱訂單和測試支付和生活都被扣除我的首期付款,並顯示了經常性支付週期第二天顯示到期。但是當我第二天檢查時,它顯示暫停付款的狀態。我也附上顯示暫停的我的貝寶帳戶的屏幕截圖。 enter image description here

在此先感謝

+0

什麼是最終目標?據我瞭解這工作正常嗎? – Pavel

+0

我的目標是定期付款應該自動收費,但它沒有。只有初始付款被收取,但下一個週期在第二天,它顯示暫停,你可以在附帶的問題截圖中看到。 –

+0

我認爲這完全相反,在您的屏幕上的初始付款設置爲0.00,但第一次重複執行 – Pavel

回答

0

你必須設置爲1,失敗的最大數量這意味着,如果支付失敗的配置文件將自動一次嘗試之後暫停。你需要增加數量爲2或3

<!-- PayPal reattempts failed recurring payments. --> 
<input type="hidden" name="sra" value="1"> 

如果你不想要一個首期付款,你可以加1天試用期或長不過你想要的試用期。試用期可以是0.00

<!-- Set the terms of the 1st trial period. --> 
<input type="hidden" name="a1" value="0.00"> 
<input type="hidden" name="p1" value="1"> 
<input type="hidden" name="t1" value="D"> 

如需更多幫助,這裏是從PayPal的開發者網站的Recurring Payments Subscription Guide

+0

好吧,我會增加失敗次數並更新它是否有效。 –