我目前正在使用PayPal Adaptive Payments API,使用Angel Eyes Library
我正在使用PayWithOptions.php(也称为:Pay)
它的作用是,只需点击一下按钮,即可通过我的PayPal帐户向客户的PayPal帐户发送付款。
我遇到了一个问题:
Invalid request parameter: institutionId with value 5
完整错误:
[Ack] => Failure
[Build] => 9898581
[CorrelationID] => 2aa511de53ce9
[Timestamp] => 2014-03-05T02:59:16.748-08:00
[PayKey] => AP-63569347PY5071349
[PaymentExecStatus] => CREATED
[RedirectURL] => https://www.sandbox.paypal.com/webscr?cmd=_ap-payment&paykey=AP-63569347PY5071349
[PayXMLRequest] => ReturnAllen_USCREATEhttp://wattbux.com/a/APP-80W284485P519543T173.245.53.242USDEACHRECEIVERECHECKBALANCECREDITCARD9test@test.comSERVICEhttp://wattbux.com/a/
[PayXMLResponse] => 2014-03-05T02:59:16.748-08:00Success2aa511de53ce99898581AP-63569347PY5071349CREATED
[SetPaymentOptionsXMLRequest] => ReturnAllen_USAP-63569347PY507134951122USERNAME1DKAngellEYE_PHPClass
[SetPaymentOptionsXMLResponse] => 2014-03-05T02:59:17.054-08:00Failure2bc204d053e2f9898581580022PLATFORMApplicationErrorApplicationInvalid request parameter: institutionId with value 5institutionId5
这是PHP代码:
$InstitutionCustomer = array(
'CountryCode' => 'DK', // Required. 2 char code of the home country of the end user.
'DisplayName' => 'USERNAME', // Required. The full name of the consumer as known by the institution. 200 char max.
'InstitutionCustomerEmail' => 'PAYPAL@TEST.COM', // The email address of the consumer. 127 char max.
'FirstName' => '11', // Required. The first name of the consumer. 64 char max.
'LastName' => '22', // Required. The last name of the consumer. 64 char max.
'InstitutionCustomerID' => '1', // Required. The unique ID assigned to the consumer by the institution. 64 char max.
'InstitutionID' => '5' // Required. The unique ID assiend to the institution. 64 char max.
);
我不知道“IstitutionXXX”是什么 - 有人可以对此有所了解吗?
答案 0 :(得分:0)
我知道,这在课堂上有点误导。这些都是必需的标签,但只有在您真正包含机构信息时才需要它们。如果你把所有这些完全留下来,那么这些字段都不是必需的。
我从来没有一次需要使用这些参数,所以我不能100%确定它们用于哪一个,但是,我可以告诉你只是让它们不在请求中(并从$ PayPalRequestData中删除它们,这个问题就会消失。
其他一些参数也是如此。我通常喜欢从最少的参数开始,让事情发挥作用,然后根据需要添加东西。
同样,我知道那些必需的标签令人困惑,但尝试将这些标签视为每个阵列所需的标签。