Reply
Highlighted
Member
Posts: 1
Registered: ‎08-21-2019
Accepted Solution

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

[ Edited ]

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


Accepted Solutions
Highlighted
Solution
Accepted by topic author jasonm89
‎08-21-2019 12:53 PM
Member
Posts: 1
Registered: ‎08-29-2012

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

@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


All Replies
Highlighted
Solution
Accepted by topic author jasonm89
‎08-21-2019 12:53 PM
Member
Posts: 1
Registered: ‎08-29-2012

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

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