81002 - 链接付款的未指定方法

时间:2013-07-15 22:36:25

标签: methods paypal unspecified

我在链式自适应付款电话(通过PHP)上收到以下消息。谁能明白为什么?

array(5) {
  ["ACK"]=>
  string(7) "Failure"
  ["L_ERRORCODE0"]=>
  string(5) "81002"
  ["L_SHORTMESSAGE0"]=>
  string(18) "Unspecified Method"
  ["L_LONGMESSAGE0"]=>
  string(33) "Method Specified is not Supported"
  ["L_SEVERITYCODE0"]=>
  string(5) "Error"
}

使用PHP进行调用,数据如下:

METHOD=PAY&VERSION=84&PWD=xxxxxxxx&USER=support_api1.handmade.com&SIGNATURE=Ai1PaghZh5FmBLCxDCTQpwGx8jB26x4ALMef45mrA1XxMjpRjp20Iz6z.OBactionType=CREATE
¤cyCode=GBP
&returnUrl=http%3A%2F%2Fwww.handmadeandunique.com%2Fsuccess.php
&cancelUrl=http%3A%2F%2Fwww.handmadeandunique.com%2Ffail.html
&feesPayer=PRIMARYRECEIVER
&memo=Test+transaction
&trackingId=ZGP-32322323s
&ipnNotificationUrl=http%3A%2F%2Fwww.handmade.com%2FIPN.php
&receiverList.receiver(0).email=jennie%40xxxxx.me.uk
&receiverList.receiver(0).amount=100
&receiverList.receiver(0).invoiceId=ZGP-32322323s
&receiverList.receiver(0).primary=true
&receiverList.receiver(0).paymentType=GOODS
&receiverList.receiver(1).email=billy-browse%40hotmail.co.uk
&receiverList.receiver(1).amount=4
&receiverList.receiver(1).invoiceId=ZGP-32322323s
&receiverList.receiver(1).primary=false
&receiverList.receiver(1).paymentType=GOODS
&BUTTONSOURCE=PP-ECWizard

2 个答案:

答案 0 :(得分:0)

您未在Adaptive Payment API调用中定义METHOD值或变量。

以下是Pay API调用的示例请求:

actionType=PAY
receiverList.receiver(0).email=x@y.com
receiverList.receiver(0).amount=100.00
currencyCode=USD
feesPayer=EACHRECEIVER
memo=Simple payment example.
cancelUrl=http://return.com/cancel.php
returnUrl=http://cancel.com/return.php
ipnNotificationUrl=http://www.notify.com//ipn-listener.php
requestEnvelope.errorLanguage=en_US

答案 1 :(得分:0)

您是否检查过您没有对参数进行两次编码?我的情况是通过http_build_query()和一些默认设置发生的,由于某些原因由于在运行时在某处被更改而不稳定。

确保你没有编码twize,如果使用http_build_query()更新你的函数,那么它将在编码部分显式:

from: http_build_query($requestParameters)

to: http_build_query($requestParameters,'','&')

不同之处在于最后一个版本将明确使用&作为分隔符,而第一个将使用默认值,所以一定要确定。