php - How do you get the payKey from a transactionId? -


i've been using paypals ipn receive , process payments, storing transactionid reference.

the time has come able refund payments through system i'm developing , here lies struggle.

when using entering transactionid paykey field on getpaymentdetails.php sample in updated php sdk, correct authentication details , application id, get:

error id: 580022 domain: platform severity: error category: application message: invalid request parameter: paykey value [removed (transactionid)] parameter: array 

this understandable, expecting paykey. now, can change $pdrequest->paykey = $paykey; $pdrequest->transactionid = $paykey; per specification. should send transactionid transactionid , work, in response:

error id: 520002 domain: platform severity: error category: application message: internal error 

ok, broken. suspect not allow transactionid used reference , haven't updated documentation (typical). reason suspect original sdk used included field transactionid, trackingid , identifier. updated sdk asks paykey.

now i'm stuck. i've collected thousands of live transactionids. know how can paykey each transaction, or fix original problem.

thanks

more info:

here http headers sent:

x-paypal-security-signature: [removed] x-paypal-security-userid: [removed] x-paypal-security-password: [removed] x-paypal-application-id: [removed] x-paypal-request-source: php_soap_sdk_v1.4 x-paypal-device-ipaddress: 127.0.0.1 x-paypal-message-protocol: soap11 x-paypal-request-source: php_soap_sdk_v1.4 

and here content

<soap:envelope xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:xsd="http://www.w3.org/2001/xmlschema"     xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">  <soap:body><paymentdetailsrequest>     <requestenvelope>         <errorlanguage>en_us</errorlanguage>     </requestenvelope>     <transactionid>[removed]</transactionid> </paymentdetailsrequest></soap:body> </soap:envelope> 

to

https://svcs.paypal.com/adaptivepayments/paymentdetails 

i have 1 suggestion:

i suppose have transaction ids saved in db,

loop records, transaction ids, paykey transaction id , update relevant orders,

then can have transaction , paykey values, single record.


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -