cancel
Showing results for 
Search instead for 
Did you mean: 

Getting a invalid credit card number when trying to issue a refund in Sandbox

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

jasonm89
Member
1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

rhldr
Member
1 REPLY 1

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

rhldr
Member