使用预先批准的付款时,您不需要发件人 ID。预批准密钥本身与批准它的发件人有关。
这是使用预批准密钥的支付示例请求和响应,无需任何发件人 ID 即可正常工作。
要求
<?xml version="1.0" encoding="utf-8"?>
<PayRequest xmlns="http://svcs.paypal.com/types/ap">
<requestEnvelope xmlns="">
<detailLevel>ReturnAll</detailLevel>
<errorLanguage>en_US</errorLanguage>
</requestEnvelope>
<actionType xmlns="">PAY</actionType>
<cancelUrl xmlns="">http://paypal.angelleye.com/paypal/class/1.2/Pay_Cancel.php</cancelUrl>
<clientDetails xmlns="">
<applicationId xmlns="">APP-80W284485P519543T</applicationId>
<ipAddress xmlns="">192.168.1.1</ipAddress>
</clientDetails>
<currencyCode xmlns="">USD</currencyCode>
<preapprovalKey xmlns="">PA-2AY45015CC5060422</preapprovalKey>
<receiverList xmlns="">
<receiver xmlns="">
<amount xmlns="">5.00</amount>
<email xmlns="">usb_1329725429_biz@angelleye.com</email>
</receiver>
</receiverList>
<sender>
<useCredentials xmlns=""></useCredentials>
</sender>
<account xmlns="">
<phone xmlns=""></phone>
</account>
<returnUrl xmlns="">http://paypal.angelleye.com/paypal/class/1.2/Pay_Return.php</returnUrl>
</PayRequest>
回复
<?xml version='1.0' encoding='UTF-8'?>
<ns2:PayResponse xmlns:ns2="http://svcs.paypal.com/types/ap">
<responseEnvelope>
<timestamp>2013-09-24T13:57:52.350-07:00</timestamp>
<ack>Success</ack>
<correlationId>2fa4316b879b9</correlationId>
<build>7767516</build>
</responseEnvelope>
<payKey>AP-5632737798659023M</payKey>
<paymentExecStatus>COMPLETED</paymentExecStatus>
<paymentInfoList>
<paymentInfo>
<transactionId>53664474R26308454</transactionId>
<transactionStatus>COMPLETED</transactionStatus>
<receiver>
<amount>5.00</amount>
<email>usb_1329725429_biz@angelleye.com</email>
<primary>false</primary>
<accountId>C9TAVNJFATXCS</accountId>
</receiver>
<pendingRefund>false</pendingRefund>
<senderTransactionId>3CV49919EJ546411E</senderTransactionId>
<senderTransactionStatus>COMPLETED</senderTransactionStatus>
</paymentInfo>
</paymentInfoList>
<sender>
<accountId>E7BTGVXBFSUAU</accountId>
</sender>
</ns2:PayResponse>
您可以在上面看到响应实际上包括它根据请求中提供的预批准密钥知道的发件人 ID。