Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AVS response code to ActiveMerchant responses #9

Closed
wants to merge 1 commit into from

Conversation

philbirt
Copy link
Contributor

This will also allow payment processing to store AVS codes on the Spree::Payment model.

@philbirt
Copy link
Contributor Author

philbirt commented Dec 1, 2015

@athal7 would you mind taking a look at this today?

@athal7
Copy link

athal7 commented Dec 1, 2015

👍

Some non-blocking comments:

  • The options_from_results method is a bit vague, I wonder if we need to have an empty has vs keys with nil values?
  • Would be interested to see some failure case specs, or maybe an assertion around the value as opposed to just the presence
  • Here's a fun implementation idea for the options method:
{}.tap do |opts|
  opts.merge!(authorization: result.transaction.id, avs_result: { code: result.transaction.avs_street_address_response_code }) if result.success?
end

@philbirt
Copy link
Contributor Author

philbirt commented Dec 2, 2015

  • Added assertions against the value instead of presence
  • Tap tap tap
  • Renamed the method to "build_results_hash" which i think is a bit more explanatory of what its doing

What do you think?

@athal7
Copy link

athal7 commented Dec 3, 2015

👍

@athal7
Copy link

athal7 commented Dec 3, 2015

I like the new method name too

@jhawthorn
Copy link
Contributor

Merged as #18

@jhawthorn jhawthorn closed this Mar 31, 2016
gsmendoza pushed a commit to gsmendoza/solidus_braintree that referenced this pull request Dec 28, 2022
Add option to send extra options to Braintree
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants