Hi, Moneris Support!
Using PHP API we do `preauth` and then `completion`...Trying to refund a transaction.
URL: https://esqa.moneris.com:443/gateway2/servlet/MpgRequest
<?xml version="1.0" encoding="UTF-8"?><request><store_id>store5</store_id><api_token>yesguy</api_token><refund><order_id>60920210301091912</order_id><amount>26.42</amount><txn_number>592692-1_19</txn_number><crypt_type>7</crypt_type></refund></request>
<request>
<store_id>store5</store_id><api_token>yesguy</api_token>
<refund>
<order_id>60920210301091912</order_id>
<amount>26.42</amount>
<txn_number>592692-1_19</txn_number>
<crypt_type>7</crypt_type>
</refund>
</request>
order_id - unique call idtxn_number - is txn_number of `completion` call
order_id
txn_number
The response we are getting is not very helpfull:
<Message>DBRequestCalls:createRefundInfoArray, Nothing returned from the query</Message>
Everything seems provided properly and according to the docs. XML provided above returned by $mpgRequest->toXML();.
$mpgRequest->toXML();
What are we doing wrong?
Thanks
Boris
As an addition to the question:
According to the docs order_id
For Refund, Completion and Purchase Correction transactions, the order ID must be the same as that of the original transaction.
We have tried that as well - same result.
I was able to finally figure out the issue.
There is no problem with refund on purchase transaction.But if you do a refund call on preauth->complete combination, you have to use order_id of preauth and txn_number of the complete.
purchase
refund
preauth->complete
preauth
complete
Moneris documentation should slightly be changed:
'order_id'For Refund, Completion and Purchase Correction transactions, the order ID must be the same as that of the original AUTHORISATION OR PURCHASE transaction. 'txn_number'When performing a Refund or a Purchase Correction, this value must reference the Completion or the Purchase.
'order_id'For Refund, Completion and Purchase Correction transactions, the order ID must be the same as that of the original AUTHORISATION OR PURCHASE transaction.
'order_id'
'txn_number'When performing a Refund or a Purchase Correction, this value must reference the Completion or the Purchase.
'txn_number'
Hope this will help people