Q:

Invalid transactionID

Problem : Transaction Id is not Valid in DoVoid Method [API call] in Paypal Payment Pro[Direct payment]. Using NVP(Name Value Pair).
I have made a test application to use Paypal Payment Pro [Direct payment].
I have successfully made the API cal for Payment [Method Name="DoDirectPayment"] and [Refund Method Name="RefundTransaction "].
please Refer "https://developer.paypal.com/docs/classic/api/merchant/DoDirectPayment_API_Operation_NVP/" for Do Direct Payment Method
Now i want to make a payment Cancel. I am now using DoVoid Method .
I am Passing The Transaction Id in AUTHORIZATIONID, But in response i am Getting Failure and ErrorMsg="Transaction Id is Invalid"
Response :"TIMESTAMP=2014-03-20T11:17:47Z&CORRELATIONID=806e38eec5474&ACK=Failure&VERSION=98.0&BUILD=10030158&L_ERRORCODE0=10609&L_SHORTMESSAGE0=Invalid transactionID.&L_LONGMESSAGE0=Transaction id is invalid.&L_SEVERITYCODE0=Error"
In DoVoid method there is a parameter called AUTHORIZATIONID where it is asking for Authorization ID or The Order ID .
From where to get the Order Id in the Response of DoDirectPayment Method so I can use that in DoVoid Method For Voiding the Transaction.
Please get me the Answer for this as soon as possible. If any query, please revert me on spathai04@gmail.com
Thanks & Regards
Sunny
spathai04@gmail.com

A:

Order ID's would only be associated with Express Checkout orders.  When working with DoDirectPayment you won't have that.
In your case, it sounds like your original DDP request was sent as a Sale transaction.  These cannot be voided.  
Instead, run the DDP as an Authorization.  This will create the authorization transaction which can then be captured with DoCapture or voided with DoVoid.  When necessary, you could use DoReauthorization to extend the auth period as well.

