I have successfully integrated the Silent Post feature with our system for ARB subscriptions. What I am now trying to do is when we refund a payment via the merchant interface, how do I distinguish a refund from all other transactions? Is the a special variable that is set for a refunded payment?
Asked
Active
Viewed 430 times
1 Answers
0
x_type
will be set to "credit"
Here is an actual Silent Post verifying that (sensitive info is removed/changed)
Array
(
[x_response_code] => 1
[x_response_subcode] => 1
[x_response_reason_code] => 1
[x_response_reason_text] => This transaction has been approved.
[x_auth_code] => 056187
[x_avs_code] => P
[x_trans_id] => 2692444422
[x_invoice_num] => 123
[x_description] =>
[x_amount] => 59.90
[x_method] => CC
[x_type] => credit
[x_cust_id] => 1234
[x_first_name] => John
[x_last_name] => Smith
[x_company] =>
[x_address] =>
[x_city] =>
[x_state] =>
[x_zip] =>
[x_country] =>
[x_phone] =>
[x_fax] =>
[x_email] =>
[x_ship_to_first_name] =>
[x_ship_to_last_name] =>
[x_ship_to_company] =>
[x_ship_to_address] =>
[x_ship_to_city] =>
[x_ship_to_state] =>
[x_ship_to_zip] =>
[x_ship_to_country] =>
[x_tax] => 0.0000
[x_duty] => 0.0000
[x_freight] => 0.0000
[x_tax_exempt] => FALSE
[x_po_num] =>
[x_MD5_Hash] => 2A4A7F63DB4390A317E4988430FFA4
[x_cvv2_resp_code] =>
[x_cavv_response] =>
[x_test_request] => false
)

John Conde
- 217,595
- 99
- 455
- 496
-
I have tried that and it does not work for me. I am not sure if this is correct, but I noticed after I refund a transaction, a new transaction ID is created for that refund. I am guessing the new transaction ID is the one being sent off to the Silent Post URL and not the original transaction ID that was first associated with the successful payment. Is this correct? – three3 Jun 01 '11 at 20:18
-
Yes. The old transaction ID is not returned in the x_trans_id field. You can put in another field like `x_po_num` and retrieve it from there. – John Conde Jun 01 '11 at 20:20
-
So the old transaction ID cannot be retrieved for a refund unless it is assigned to another field, such as x_po_num? How do I add the old transaction ID to the x_po_num field for transactions that have already been processed? – three3 Jun 01 '11 at 20:37
-
I don't think you can do anything about old transactions unless you're running the refund manually through the virtual terminal. If you have your transactions associated customer IDs the `x_cust` field might be useful to determine which transaction the refund is for. – John Conde Jun 01 '11 at 20:40
-
Cool, that worked perfectly. What I did was put the old transaction ID in the x_invoice_num field and it worked perfectly. Thanks a lot for your help. – three3 Jun 01 '11 at 20:50