-
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
Add Coinbase integration #915
Conversation
Time.iso8601(params['created_at']).to_time.to_i | ||
end | ||
|
||
# the money amount we received in X.2 decimal. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't seem to actually round it to two decimals, but the command says so?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since "cents" is an integer, the division will always produce an amount with 2 decimal places
For someone who doesn't know much about ActiveMerchant, can you explain why you went for a Helper and a Notification module instead of the more standard way of implementing a gateway? |
@sirupsen using a gateway would not be possible as the checkout page is hosted off-side. See the implementation of other off-site payment integrations: https://github.com/Shopify/active_merchant/tree/master/lib/active_merchant/billing/integrations |
@justinplouffe do you think you could review this? we've updated it to support API key + secret authentication as requested. |
@isaacwaller I'll try this out in Shopify soon and keep you and @barmstrong updated. |
ActiveMerchant integrations have been extracted into https://github.com/Shopify/offsite_payments. This PR has been moved (via reference) to the new repo - please follow up on it there. |
Coinbase (https://coinbase.com/) merchant tool integration for Active Merchant. Information on Coinbase's merchant offerings can be found here: https://coinbase.com/merchants
The integration is fairly simple, a api call is made to Coinbase to create the form in the Helper and the callback is verified in the Notification module.
Thanks!