Hello, I'm having an issue testing refunds in the sandbox environment. I am creating successful transactions and getting back these attributes:
transId = 0
accountNumber = XXXX1111
But when I go to refund the transaction
request.transactionRequest = TransactionRequestType.new() request.transactionRequest.amount = amount.round(2) request.transactionRequest.payment = PaymentType.new request.transactionRequest.payment.creditCard = CreditCardType.new('1111', 'XXXX') request.transactionRequest.refTransId = 0 request.transactionRequest.transactionType = TransactionTypeEnum::RefundTransaction @transaction.create_transaction(request)
I am getting back this error: "The credit card number is invalid."
Any idea why this isn't working?
Also, I cannot get transaction details for the transId 0
Solved! Go to Solution.
08-21-2019 11:28 AM - edited 08-21-2019 11:32 AM
@jasonm89 Your sandbox account is in test mode. If you switch to live mode, you'll get a valid transaction id which you can then use to void or refund a test transaction.
08-21-2019 11:44 AM
08-21-2019 11:44 AM