sample-code-ruby
sample-code-ruby copied to clipboard
Refund example
It would be really helpful to have an example using a customer profile with a payment profile.
Hi @RichardGrossman,
Sorry for delay in replying, the refund sample for a profile is pretty much identical to the charge sample here: https://github.com/AuthorizeNet/sample-code-ruby/blob/master/PaymentTransactions/charge-customer-profile.rb
Only difference is the transaction type, ie. change line 18 to:
request.transactionRequest.transactionType = TransactionTypeEnum::RefundTransaction
Hope this helps, we definitely try to add that specific sample soon, happy to take a PR for it as well ;-)
Thanks for the feedback,
Brian