我剛剛嘗試在我的網站中整合paypal支付網關。 對於我按照所有這些準則顯示的步驟,我可以支付,它讓我成功支付信息,我去我的帳戶,也有我可以info.but看到支付交易的貝寶響應(後陣列) 我得到了零(0)而不是數據。獲得零(0)貝寶迴應?
首先,我在PayPal中創建了一個開發者帳戶,然後通過我創建了一個業務帳戶和一個買方帳戶。
這裏是我的代碼
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" accept-charset="utf-8">
<input type="hidden" name="amount" value="21" readonly="" id="qty-1-amt">
<input type="hidden" name="price" value="21">
<input type="hidden" name="business" value="[email protected]">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="item_name" value="Test Mobile">
<input type="hidden" name="item_number" value="Test Item Number">
<input type="hidden" name="currency_code" value="USD">
<!-- Specify URLs -->
<input type="hidden" name="cancel_return" value="http://paymentgateway.alphansotech.com/buyproducts">
<input type="hidden" name="return" value="http://alphansotech.com/response.php">
<ul>
<li>Quantity: <input type="text" name="quantity" value="1" id="qty-1"> </li>
<li><strong>Total: </strong>$ <span id="qty-1-span">21</span></li>
<!--<li><input type="submit" name="submit" value="Buy"/></li>-->
<li> <input type="image" name="submit" border="0" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif" alt="PayPal - The safer, easier way to pay online">
<img alt="" border="0" width="1" height="1" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif"></li>
</ul>
</form>
您的要求來設置IPN以及 –
我不認爲這個問題是關於互穿網絡然而,問題是有些不清楚你說的PayPal做一個21美元的交易,但是把它稱爲0美元的交易?或者你是否說你期望在t中有一些回報參數他付款後重定向,但沒有這樣的變量?如果是後者,請閱讀關於「rm」參數的文檔。默認情況下(rm未指定,如表單所示)PayPal將變量放入GET參數中,而不是POST參數。 – geewiz
@geewiz交易是正確的,我也得到了有關交易correct.but當它被重定向到我的返回url,我越來越0,代替數據,我的代碼在返回url是** var_dump($ _ POST) **這裏我想通過貝寶迴應 –