我正在尝试将PayPal的AdaptivePayments API与数字商品一起使用,但当我被重定向到PayPal的网站进行确认时,我收到了上述错误。我使用他们的Java SDK调用PAY函数,使用PAY-KEY接收成功消息并重定向用户进行确认,但我总是收到此消息。任何人都知道为什么?
要看到这种情况,您可以使用以下脚本:
#!/bin/bash
USERID=""
PASSWORD=""
SIGNATURE=""
APPID="APP-80W284485P519543T"
RECEIVER="test@test.com"
AMOUNT="100.00"
CANCELURL="http://example.com/cancel"
RETURNURL="http://example.com/return"
RESULT=$(curl -s --insecure -H "X-PAYPAL-SECURITY-USERID: $USERID" -H "X-PAYPAL-SECURITY-PASSWORD: $PASSWORD" -H "X-PAYPAL-SECURITY-SIGNATURE: $SIGNATURE" -H "X-PAYPAL-REQUEST-DATA-FORMAT: NV" -H "X-PAYPAL-RESPONSE-DATA-FORMAT: JSON" -H "X-PAYPAL-APPLICATION-ID: $APPID" https://svcs.sandbox.paypal.com/AdaptivePayments/Pay -d "requestEnvelope.errorLanguage=en_US&actionType=PAY&receiverList.receiver(0).email=$RECEIVER&receiverList.receiver(0).amount=$AMOUNT&memo=Parallel payment example.&cancelUrl=$CANCELURL&returnUrl=$RETURNURL;")
echo $RESULT
获取密钥后,将其复制并转到此网址: https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_ap-payment&paykey=PLACE_THE_KEY_HERE
谢谢!
答案 0 :(得分:2)
我收到了这个错误,因为我将用户重定向到了错误的网址。应该是:https://www.sandbox.paypal.com/webapps/adaptivepayment/flow/pay?paykey=PLACE_KEY_HERE