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.
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.