This guide请求关于ClientDetails字段的preapproval密钥谈话,但示例没有它们,所以我的问题是如何将ClientDetails字段添加到请求消息中?我想传递客户端用户名,以便在客户批准付款时我可以从IPN取回,所以我知道批准所属的客户。
curl -s --insecure
-H "X-PAYPAL-SECURITY-USERID: api_username"
-H "X-PAYPAL-SECURITY-PASSWORD: api_password"
-H "X-PAYPAL-SECURITY-SIGNATURE: api_signature"
-H "X-PAYPAL-REQUEST-DATA-FORMAT: NV"
-H "X-PAYPAL-RESPONSE-DATA-FORMAT: NV"
-H "X-PAYPAL-APPLICATION-ID: app_id"
https://svcs.sandbox.paypal.com/AdaptivePayments/Preapproval -d
"cancelUrl=http://your_cancel_url
¤cyCode=USD
&endingDate=2009-12-13T08%3A00%3A00.000Z
&maxAmountPerPayment=200.00
&maxNumberOfPayments=30
&maxTotalAmountOfAllPayments=1500.00
&pinType=NOT_REQUIRED
&requestEnvelope.errorLanguage=en_US
&returnUrl=http://your_return_url
&startingDate=2009-07-13T07%3A00%3A00.000Z
&senderEmail=sender@domain
编辑:
实际的NVP字符串:
cancelUrl=http://www.example.com/members/try-again/
¤cyCode=USD
&endingDate=2017-12-13T08%3A00%3A00.000Z
&maxAmountPerPayment=200.00
&maxNumberOfPayments=30
&maxTotalAmountOfAllPayments=1500.00
&pinType=NOT_REQUIRED
&requestEnvelope.errorLanguage=en_US
&returnUrl=http://www.example.com/members/add-payment/
&startingDate=2015-12-27T07%3A00%3A00.000Z
&ipnNotificationUrl=http://www.example.com/members/ipn.php
&customerid=testid