Skip to content

fix CheckoutUtility URL to /checkout/ - #3

Merged
aaeabdo merged 1 commit into
masterfrom
develop
May 29, 2020
Merged

fix CheckoutUtility URL to /checkout/#3
aaeabdo merged 1 commit into
masterfrom
develop

Conversation

@aaeabdo

@aaeabdo aaeabdo commented May 29, 2020

Copy link
Copy Markdown

For testing:

  • Point the gem locally to the develop branch gem 'adyen-ruby-api-library', github: 'onrunning/adyen-ruby-api-library', branch: 'develop', ref: '95a3f45'
  • You should be able to go through the checkout without issues

@aaeabdo
aaeabdo requested a review from severin May 29, 2020 08:18
@aaeabdo aaeabdo self-assigned this May 29, 2020
@aaeabdo

aaeabdo commented May 29, 2020

Copy link
Copy Markdown
Author

Of course, the sooner we get rid of apple pay express, we can point the gem its' origin and not need to worry about being behind. Let's see what the analysis results in.

@severin severin left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aaeabdo this is only including 2 out of three changes in the original pull request, is that intended? Does the change of the URL in the service_url_base method not apply to us?

@aaeabdo

aaeabdo commented May 29, 2020

Copy link
Copy Markdown
Author

@severin It does apply though was already covered by me when first porting the gem: https://github.com/onrunning/adyen-ruby-api-library/blob/develop/lib/adyen/client.rb#L41 . The change makes the for the checkoutUtility and checkout similar to each other, with the combined condition that's already covered.

@severin severin left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aaeabdo I tested a simple card checkout and it worked.

@aaeabdo
aaeabdo marked this pull request as ready for review May 29, 2020 08:35
@aaeabdo

aaeabdo commented May 29, 2020

Copy link
Copy Markdown
Author

I was making the PR draft until making sure that the production environment won't be broken by this change. I made sure of this following these steps:

  • copying the production adyen api from the production database to the local database
  • running a console with the following ruby code
config = Spree::Gateway::AdyenApi.find_by(environment: 'production').preferences
client = ::AdyenAPI::Client.new(api_key: config.fetch(:api_key), env: config.fetch(:environment).to_sym, live_url_prefix: config.fetch(:live_url_prefix))
client.checkout_utility.origin_keys(originDomains: ['https://www.on-running.com']).body # => "{\"originKeys\":{\"https:\\/\\/www.on-running.com\":\"pub.v2.2615010577511341.aHR0cHM6Ly93d3cub24tcnVubmluZy5jb20.ak15kZVmruFTUF4d3k_jUglcQXYgZnVGYS1KNpI5qVU\"}}"

@aaeabdo

aaeabdo commented May 29, 2020

Copy link
Copy Markdown
Author

@severin thanks for the quick feedback :) . I'll merge it and open a pr in the main app.

@aaeabdo
aaeabdo merged commit 4626af4 into master May 29, 2020
@rkorzeniec

Copy link
Copy Markdown

yet another reason to get rid of current apple pay express

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