sample-code-ruby icon indicating copy to clipboard operation
sample-code-ruby copied to clipboard

Refund example

Open RichardGrossman opened this issue 10 years ago • 1 comments

It would be really helpful to have an example using a customer profile with a payment profile.

RichardGrossman avatar Apr 18 '16 19:04 RichardGrossman

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

brianmc avatar Apr 27 '16 21:04 brianmc