3

In test mode,When I try to make refund for my transactions via Authorize.net AIM by using only the last 4 digits of credit card , it shows the following error.

(TESTMODE) The credit card number is invalid

But strangely, when I enter the complete creditcard number(4007000000027) , the refund works perfectly fine ;
So how can I make my transactions refund by using only the last 4 digits of my credit card in test mode ?
PS: I even tried XXXXXXXX0027 as an input , but didnt work.

John Conde
  • 217,595
  • 99
  • 455
  • 496
Vegeta
  • 291
  • 2
  • 7
  • 20

2 Answers2

2

If you try to do a refund before the transaction is settled you will get this error. Since transactions in test mode are never settled you can't test them this way. If you want to test your code you need to use a developer account which will let you test like you are in live mode but without incurring any fees.

John Conde
  • 217,595
  • 99
  • 455
  • 496
  • Thank you for the reply John.But I am already using Developer Account for this check in test mode.And will it work in live account if I use only the last 4 digits of a credit card number ? – Vegeta Dec 03 '12 at 04:31
  • And also you need to be sure to send the original transaction ID as "x_ref_trans_id" instead of just "x_trans_id". – Vegeta Dec 16 '13 at 11:02
0

If you void the transaction you won't need to include those credit card numbers and it should go through. Is your x_type parameter set to Credit? Set it to VOID and take out the credit card number parameter. I have read numerous articles that say its best to Void a transaction for the lack of fees on both parties and also it goes through more often then credits.

Josh
  • 1