81002 - Unspecified Method, on chained payment

409 views Asked by At

I'm getting the the following message on a chained adaptive payment call (via PHP). Can anyone see why?

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"
}

Call is being made with PHP and the data is as follows:

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

There are 2 answers

0
Gerzie On

You don't define a METHOD value or variable in an Adaptive Payment API call.

Here is a sample request for a Pay API call:

actionType=PAY
receiverList.receiver(0)[email protected]
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
0
Kim Steinhaug On

Have you checked that you are not encoding the parameters twice? Im my case that was happening though http_build_query() and some default setting which was unstable for some reason due to being changed somewhere during runtime.

Make sure you are not encoding twize, and if using http_build_query() update your function so it will be explicit on the encoding part:

from: http_build_query($requestParameters)

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

The difference is that the last version will explicitly use & as delimiter while the first will use the default, so be sure.