0

请在下面找到我对贝宝代码的简单自适应支付,并告诉我为什么我在沙盒环境中得到错误的凭据。虽然,凭证看起来是正确的。通过查看贝宝文档https://developer.paypal.com/webapps/developer/docs/classic/api/adaptive-payments/Pay_API_Operation/,我真的很努力

Thank you in advance guys...Please do help me..



My code
==============================================================

<head runat="server">
<meta name="X-PAYPAL-SECURITY-USERID" content="xxxxxxxx_api1.hotmail.com" />
<meta name="X-PAYPAL-SECURITY-PASSWORD" content="xxxxxxx" />
<meta name="X-PAYPAL-SECURITY-SIGNATURE" content="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" />
<meta name="X-PAYPAL-REQUEST-DATA-FORMAT" content="NV" />
<meta name="X-PAYPAL-RESPONSE-DATA-FORMAT" content="NV" />
<meta name="X-PAYPAL-APPLICATION-ID" content="APP-80W284485P519543T" />
</head>

<body>
<form action="https://svcs.sandbox.paypal.com/AdaptivePayments/Pay" method="post">
<input type="hidden" name="X-PAYPAL-SECURITY-USERID" value="xxxxxxxxx.hotmail.com" />
<input type="hidden" name="X-PAYPAL-SECURITY-PASSWORD" value="xxxxxxxx" />
<input type="hidden" name="X-PAYPAL-SECURITY-SIGNATURE" value="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" />
<input type="hidden" name="X-PAYPAL-REQUEST-DATA-FORMAT" value="NV" />
<input type="hidden" name="X-PAYPAL-RESPONSE-DATA-FORMAT" value="NV" />
<input type="hidden" name="X-PAYPAL-APPLICATION-ID" value="APP-80W284485P519543T" />
<input type="hidden" name="returnURL" value="http://www.returnurl.com" />
<input type="hidden" name="cancelURL" value="http://www.cancelurl.com" />
 <input type="hidden" name="actionType" value="PAY" />  
 <input type="hidden" name="feesPayer" value="SENDER" />
 <input type="hidden" name="item_name" value="PMP" />
 <input type="hidden" name="amount" value="50" />
 <input type="hidden" name="currency_code" value="USD" />
 <input type="hidden" name="button_subtype" value="services" />
 <input type="hidden" name="item_number" value="00300" />
 <input type="hidden" name="shipping" value="2" />
 <input type="hidden" name="handling" value="4" />
 <input type="hidden" name="tax" value="3.5" />
 <input type="hidden" name="clientDetails.ipAddress" value="127.0.0.1" />
  <input type="hidden" name="deviceId" value="mydevice" />
  <input type="hidden" name="clientDetails.applicationId" value="APP-80W284485P519543T" />
 <input type="hidden" name="receiverList.receiver(0).email" value="eng.rayed@hotmail.com" />
 <input type="hidden" name="receiverList.receiver(0).amount" value="5" />
 <input type="hidden" name="receiverList.receiver(1).email" value="eng.rayeduk@gmail.com" />
 <input type="hidden" name="receiverList.receiver(1).amount" value="2" />
 <input type="hidden" name="receiverList.receiver(0).primary[0]" value="true" />
 <input type="hidden" name="receiverList.receiver(1).primary[1]" value="false" />
 <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_paynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!" />
</form>





//End of code
=============================================================
4

1 回答 1

1

X-PAYPAL-SECURITY-* 参数需要作为 HTTP 标头而不是隐藏表单字段发送。

于 2013-05-14T05:39:43.010 回答