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 support for Response.authorization field #7

Closed
ewalk153 opened this issue Dec 4, 2013 · 5 comments
Closed

Add support for Response.authorization field #7

ewalk153 opened this issue Dec 4, 2013 · 5 comments

Comments

@ewalk153
Copy link
Contributor

ewalk153 commented Dec 4, 2013

A few of the ActiveMerchant::Billing::Response attributes are based on "magic" from the params and options hash.

Moving

            :test => test?,
            :authorization => response[:numappel].to_s + response[:numtrans].to_s,
            :fraud_review => fraud_review?(response),

from params to options enable these fields to be accessible directly. Authorization field example

Options include moving the fields from params to options, or duplicating them for backwards support where people may already be accessing them via Response.params.
Happy to put up a pull request.

@arambert
Copy link
Owner

arambert commented Dec 4, 2013

Why not, don't hesitate to submit PRs 😄

@ewalk153
Copy link
Contributor Author

ewalk153 commented Dec 4, 2013

Thanks!

@ewalk153
Copy link
Contributor Author

ewalk153 commented Dec 4, 2013

Do you prefer to preserve a copy of the fields in params, or just go ahead and move them?

@arambert
Copy link
Owner

arambert commented Dec 4, 2013

I'm not sure to perfectly understand what you want to do, but my answer may be enough anyway: preserve backward compatibility

@ewalk153
Copy link
Contributor Author

ewalk153 commented Dec 4, 2013

That works.

@arambert arambert closed this as completed Feb 2, 2016
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

No branches or pull requests

2 participants