active_merchant icon indicating copy to clipboard operation
active_merchant copied to clipboard

Question about braintree blue refund implementation

Open daisy1754 opened this issue 5 years ago • 4 comments

Currently braintree blue refund is implemented in following way:

  1. try refund
  2. it it fails, try void https://github.com/activemerchant/active_merchant/blob/1d84209e9d37c12c3591a6372bf381ee08294251/lib/active_merchant/billing/gateways/braintree_blue.rb#L102

Is there any reason library is not fetching the transaction status and then do either refund or void? Current implementation is causing error response and seems a bit weird.

I'm happy to send a pull request to change behaviour but wanted to check if this is intentional. [EDIT: I no longer remember about this, so probably cannot send PR by myself]

daisy1754 avatar Oct 17 '19 18:10 daisy1754

@daisy1754 What field in the Braintree Blue purchase transaction response represents the transaction_id to be used in the refund? Is it the network_transaction_id field found in the transaction response?

martinstreicher avatar Apr 09 '20 15:04 martinstreicher

@martinstreicher quite honestly I don't remember

daisy1754 avatar Apr 10 '20 03:04 daisy1754

No worries. I found it. It's the authorization field in the response.

martinstreicher avatar Apr 10 '20 10:04 martinstreicher

Marking this "of interest" before a cleanup of stale issues

curiousepic avatar Oct 26 '23 18:10 curiousepic