-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Support Quickbooks Payments OAuth2 by Dec 17, 2019 #3370
Comments
This seems to be completed with release 1.101.0, however, the documentation has not been updated to reflect the appropriate usage of OAuth2 implementation. I tried to parse the test cases to identify the appropriate use of the implementation, but I'm confused on the requirement to provide access_token and refresh_token on constructing the gateway. In the intuit documentation, you only need to provide the client_id and secret, so should these just be placeholders? If there is any example code of this functionality being used, please let me know. Thanks in advance! |
I have been using this version of the Quickbooks gateway on my fork... It initializes with the access token (and no refresh token). Notice that my my fork does not have any of the refresh token logic in it. I do not think it is the job of ActiveMerchant to refresh the access token. Honestly I am not sure where my version came from - maybe it was posted here at some point in time. Imho the master version here needs some work to remove the backward compatibility logic and access token refresh logic. I would be happy to issue a PR if some folks could use this. I have been using my fork because it seems like this gateway is not heavily used or maintained here so I don't want to add a PR to the big PR pile. gateway = ActiveMerchant::Billing::QuickbooksOauth2Gateway.new(
:consumer_key=>client_id,
:consumer_secret=>client_secret,
:access_token=>oauth_access_token.token || "",
:token_secret=>refresh_token || "",
:realm=>company_id || "",
:test=>true
) |
Another note about refreshing the access token... The gateway calls will fail if the access_token is not accepted by Quickbooks. I think it is the job of the application level error handling to refresh the access token (i.e. manage the authentication with Quickbooks), and the job of ActiveMerchant to use the access_token to process transactions. Suggested in #4104 |
Quickbooks Online API Access will require OAuth2 by Dec 17, 2019.
The text was updated successfully, but these errors were encountered: