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

SCA automatic payments #21

Open
PerkmannM opened this issue Aug 29, 2019 · 3 comments
Open

SCA automatic payments #21

PerkmannM opened this issue Aug 29, 2019 · 3 comments

Comments

@PerkmannM
Copy link

The upcoming PSD2 forces SCA for all our future payments.
Based on the docs (https://developer.amazon.com/docs/eu/amazon-pay-automatic/sca-upgrade-merchant-initiated-transactions.html#change-the-process-to-set-up-a-new-billing-agreement),
it states:

If setBillingAgreementDetails returns a constraint, handle them as described in Step 2: Set purchase details and define the purchase of the Amazon Pay and Login with Amazon integration guide. Otherwise, proceed and call the confirmBillingAgreement operation.
The confirmBillingAgreement operation requires the following input parameters...
and in the example there is a call to client.confirm_order_reference (which is not mentioned in the integration steps for AUTOMATIC PAYMENTS):

require 'pay_with_amazon'

merchant_id = 'YOUR_MERCHANT_ID'
access_key = 'YOUR_ACCESS_KEY'
secret_key = 'YOUR_SECRET_KEY'

client = PayWithAmazon::Client.new(
    merchant_id,
    access_key,
    secret_key,
    sandbox: true,
    currency_code: :eur,
    region: :de
)

client.confirm_order_reference(
    amazon_order_reference_id,
    success_url: 'https://www.test.com/OrderConfirmed',
    failure_url: 'https://www.test.com/OrderFailed'
)

Is client.confirm_order_reference used for automatic payments too?
If yes then is amazon_order_reference_id the same as BillingAgreement Id?
If not what are the correct steps to be SCA compliant for automatic payments with merchant initiated transactions?

@bjguillot
Copy link
Contributor

We are working on the necessary changes to the Ruby SDK now. We will publish it once we complete testing. There will be new attributes added in the confirm_billing_agreement and set_billing_agreement_details calls.

@andreasunterhuber
Copy link

@bjguillot ok, nice! Time is running out ;) SCA will be introduced on September 14. Waiting hard for the update 👍

@bjguillot
Copy link
Contributor

Version 2.5.0 deployed with the SCA changes for automatic payments (billing agreements):
https://github.com/amzn/amazon-pay-sdk-ruby/releases/tag/2.5.0

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

3 participants