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

Bump activemerchant from 1.123.0 to 1.126.0 #9593

Closed
wants to merge 1 commit into from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Aug 25, 2022

Bumps activemerchant from 1.123.0 to 1.126.0.

Release notes

Sourced from activemerchant's releases.

v1.126.0

What's Changed

... (truncated)

Changelog

Sourced from activemerchant's changelog.

== Version 1.126.0 (April 15th, 2022)

  • Moneris: Add 3DS MPI field support [esmitperez] #4373
  • StripePI: Add ability to change payment_method_type to confirm_intent [aenand] #4300
  • GlobalCollect: Improve support for Naranja and Cabal card types [dsmcclain] #4286
  • Payflow: Add support for stored credentials [ajawadmirza] #4277
  • Orbital: Don't void $0 auths for Verify [javierpedrozaing] #2487
  • StripePI: Enable Apple Pay and Google Pay payment methods [gasb150] #4252
  • PaySafe: Update unstore method and authorization for redact [ajawadmirza] #4294
  • CyberSource: Add national_tax_indicator fields in authorize and purchase [ajawadmirza] #4299
  • NMI: Update gateway credentials to accept security_key [javierpedrozaing] #4302
  • PaySafe: Fix commit for unstore method [ajawadmirza] #4303
  • Ebanx: Add support for order_number field [ali-hassan] #4304
  • BlueSnap: Add support for idempotency_key field [drkjc] #4305
  • Paymentez: Update capture method to verify by otp for pending transactions [ajawadmirza] #4267
  • BlueSnap: Update refund request and endpoint along with merchant transaction support [ajawadmirza] #4307
  • DecidirPlus: Added authorize, capture, void, and verify methods [ajawadmirza] #4284
  • Paymentez: Fix authorize to call purchase for otp flow [ajawadmirza] #4310
  • Orbital: Indicate support for network tokenization [dsmcclain] #4309
  • IPG: remove uruguay from supported countries [ajawadmirza] #4311
  • Decidir: Add sub_payments sub-fields to gateway [meagabeth] #4315
  • Priority: Add additional fields to purchase and capture requests [dsmcclain] #4301
  • DecidirPlus: Added unstore method [ajawadmirza] #4317
  • Decidir & Decidir Plus: Revise handling of sub_payment sub-fields [meagabeth] #4318
  • DecidirPlus: Update unstore implementation to get token from params [ajawadmirza] #4320
  • CyberSource: Add option for zero amount verify [gasb150] #4313
  • PayU Latam: Refactor message_from method, fix failing remote tests [rachelkirk] #4326
  • Adyen: Add currencies with three decimals places [gasb150] #4322
  • GlobalCollect: Stregthen success criteria for void action [peteroas] #4324
  • Priority Payment Systems - Clean up/refactor gateway file and tests [ali-hassan] #4327
  • SafeCharge: change verify to send 0 amount [dsmcclain] #4332
  • DLocal: add support for force_type field [dsmcclain] #4336
  • Barclaycard SmartPay: Support more nonstandard currencies [jherreraa] #4335
  • DecidirPlus: name_override option on store [naashton] #4338
  • Priority: Update add_purchases_data to return if options[:purchases] is empty [drkjc] #4349
  • Stripe PI: update shipping field to shipping_address [ajawadmirza] #4347
  • DecidirPlus: Handle payment_method_id by card_brand [naashton] #4350
  • DecidirPlus: debit and payment_method_id fields [naashton] #4351
  • Adyen: Include Application ID in adyen authorize and purchase transactions [peteroas] #4343
  • Priority: Add support for replay_id field [drkjc] #4352
  • Stripe PI: standardize shipping_address fields [dsmcclain] #4355
  • Airwallex: support gateway [therufs] #4342
  • Litle: Translate google_pay as android_pay [javierpedrozaing] #4331
  • Braintree: Add ACH support for store [cristian] #4285
  • Simetrik: Add support for Simetrik gateway [simetrik-frank] #4339
  • EBANX: Change amount for Mexico and Chile [flaaviaa] #4337
  • DecidirPlus: Add establishment_name, aggregate_data, sub_payments, card_holder_identification_type, card_holder_identification_number, card_door_number, and card_holder_birthday fields [ajawadmirza] #4361
  • DecidirPlus: Update error_code_from to get error reason id [ajawadmirza] #4364
  • Dlocal: Add three_ds mpi support [cristian] #4345
  • Stripe PI: Add request_three_d_secure field for create_setup_intent [aenand] #4365
  • Adyen: Add verify_amount field for verify [ajawadmirza] #4369

... (truncated)

Commits
  • f7ca1f9 Airwallex: Add support for original_transaction_id
  • a9d5b3a Release v1.126.0 (#4402)
  • eda06d0 Add Cartes Bancaires bin ranges (#4398)
  • f5ba1db Airwallex: Add 3DS Global Support
  • 987ac8b Multiple Gateways: Resolve when/case bug
  • 9d22fb2 NMI: Update post URL
  • cb45b38 Priority: add settled and voided to list of successful response statuses
  • fdec498 Conekta: Fix remote test
  • 15379d2 Priority: Update verify method signature
  • 2f3db70 Rapyd: Update type option to pm_type
  • Additional commits viewable in compare view

Dependabot compatibility score

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
> **Note** > Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

@dependabot dependabot bot added dependencies ruby Pull requests that update Ruby code labels Aug 25, 2022
@mkllnk mkllnk added the blocked label Aug 29, 2022
@mkllnk
Copy link
Member

mkllnk commented Aug 29, 2022

This upgrade introduced #9580. We need to solve that problem before we upgrade again. And to solve that problem, we should probably introduce VCR tests.

I'll add some random commit to this so that Dependabot won't close it and open a new PR for newer versions.

@filipefurtad0
Copy link
Contributor

filipefurtad0 commented Sep 6, 2022

Hey @mkllnk I think I may have found a relevant spec:

context "when the user submits a new card and requests that the card is saved for later" do

Thinking out loud 🦆
So, if I understand correctly, this example did not catch bug #9580 because this spec is mocking a request/response, it never makes/caches a real request. I think we might be able to catch this one here on this request spec, since we're not necessarily dealing with :js on the browser (stripe card form).

Edit: I mean, we're dealing with :js on the browser level, but upgrading active_merchant should not really influence that I think...

@@ -180,6 +180,8 @@
end

it "allows saving a card and re-using it" do
# TODO: This case fails in production after the activemerchant upgrade.
# But this test case still passed. We need to make this spec fail correctly.
Copy link
Contributor

Choose a reason for hiding this comment

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

Continuing 🦆
Agree this one is relevant as well - here we're indeed dealing with :js (browser). So puffing-billy would be the way to go to intercept these requests.

I'm thinking though if https://github.com/phillbaker/capybara-mechanize would be suitable here too, in the case we would skip js too 🤔

Copy link
Member

Choose a reason for hiding this comment

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

I don't see how capybara-mechanize would help here. That seems to be a tool to make actual web requests from specs but we want to deal with the requests sent from our app and record real responses to replay.

@filipefurtad0 filipefurtad0 added pr-staged-uk staging.openfoodnetwork.org.uk and removed pr-staged-uk staging.openfoodnetwork.org.uk labels Sep 6, 2022
@filipefurtad0
Copy link
Contributor

I think this change could be the culprit:

https://github.com/activemerchant/active_merchant/pull/4365/files#diff-19492101b546175aa3ca6a16ec7d0a610d0adae03cbaf130eff54092dec8e0fbR127

We don't send this param whe we create a payment intent:
request_three_d_secure(post, options)

It's missing from lib/active_merchant/billing/gateways/stripe_payment_intents_decorator.rb

@mkllnk
Copy link
Member

mkllnk commented Sep 7, 2022

We don't send this param whe we create a payment intent:
request_three_d_secure(post, options)

It's missing from lib/active_merchant/billing/gateways/stripe_payment_intents_decorator.rb

Great research, thank you! That's the big problem with monkey-patching code like this. It looks like this code was originally copied to get a newer version while we were still stuck with old ActiveMerchant:

# Here we bring commit 823faaeab0d6d3bd75ee037ec894ab7c9d95d3a9 from ActiveMerchant v1.98.0
# This class integrates with the new StripePaymentIntents API
# This can be removed once we upgrade to ActiveMerchant v1.98.0

We are well passed v1.98 now and can probably just remove that code from our code base. But reproducing the issue with a spec first would give us more confidence that we are not breaking anything else.

@sigmundpetersen
Copy link
Contributor

There was an attempt at removing the decorator in #8071 , maybe we can find some useful bits in there

@jibees jibees force-pushed the dependabot/bundler/activemerchant-1.126.0 branch from 0cc7420 to 1f19aca Compare September 19, 2022 12:34
@jibees
Copy link
Contributor

jibees commented Sep 19, 2022

This upgrade introduced #9580.

As #9580 is closed (via #9585) now, I rebased this one.

@filipefurtad0 filipefurtad0 force-pushed the dependabot/bundler/activemerchant-1.126.0 branch from 1f19aca to 18a6337 Compare September 29, 2022 14:34
@sigmundpetersen
Copy link
Contributor

@dependabot-bot recreate

@dependabot dependabot bot force-pushed the dependabot/bundler/activemerchant-1.126.0 branch from 18a6337 to 10a8929 Compare October 28, 2022 08:53
@jibees
Copy link
Contributor

jibees commented Nov 3, 2022

Should we merge (or test before merging) this one?

@filipefurtad0
Copy link
Contributor

I think this needs manual testing - I have not managed to reproduce #9580 with a VCR/automated test yet.

I think it might need a code change - but perhaps best to verify if the bug is still triggered with this bump.

@filipefurtad0 filipefurtad0 added the pr-staged-uk staging.openfoodnetwork.org.uk label Nov 3, 2022
@filipefurtad0
Copy link
Contributor

Still there, checking out:

  • with a new card
  • ticking "Remember this card?"

triggers:
image

And prevents checkout completion.

@filipefurtad0 filipefurtad0 removed the pr-staged-uk staging.openfoodnetwork.org.uk label Nov 3, 2022
@jibees
Copy link
Contributor

jibees commented Nov 3, 2022

Thanks @filipefurtad0 !

@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Feb 1, 2023

Looks like activemerchant is up-to-date now, so this is no longer needed.

@dependabot dependabot bot closed this Feb 1, 2023
@dependabot dependabot bot deleted the dependabot/bundler/activemerchant-1.126.0 branch February 1, 2023 00:44
@dacook dacook restored the dependabot/bundler/activemerchant-1.126.0 branch February 1, 2023 23:14
@dacook
Copy link
Member

dacook commented Feb 1, 2023

ActiveMerchant was accidentally updated in #9850, which closed this PR. But it's been reverted (d5ae5c9), so I'm re-opening this PR.

@filipefurtad0 has re-tested:

I could not reproduce the bug anymore (which is good but puzzling, nonetheless)

It looks like we never managed to catch the original error in a spec, so we are still 'unprotected' from whatever happened before. But we can't reproduce it now, so I don't think we could write a new spec now. So it's probably best to just move on.

What do you think @filipefurtad0? Is there any other manual testing to be done before we merge?

@dacook dacook reopened this Feb 1, 2023
@dependabot dependabot bot force-pushed the dependabot/bundler/activemerchant-1.126.0 branch from 10a8929 to 0bf8dd1 Compare February 1, 2023 23:24
@filipefurtad0
Copy link
Contributor

Thank you so much for following up on this @dacook 🙏

I'd have a quick test on this PR again, to check if the checkout problem occurs - just to make sure - and post back here.

@filipefurtad0 filipefurtad0 added the pr-staged-uk staging.openfoodnetwork.org.uk label Feb 2, 2023
@filipefurtad0
Copy link
Contributor

filipefurtad0 commented Feb 2, 2023

I was still able to reproduce the error on #9580 (checking out while saving a new card like x-3184) on lib/active_merchant/billing/gateways/stripe_payment_intents_decorator.rb:60 store. It triggers an error 500.

image

https://app.bugsnag.com/yaycode/openfoodnetwork-uk/errors/62fb43b59ffd5b0008478b23?filters[event.since]=30d&filters[error.status]=open&pivot_tab=event

lib/active_merchant/billing/gateways/stripe_payment_intents_decorator.rb:60 store

57 post[:validate] = options[:validate] unless options[:validate].nil?
58 post[:description] = options[:description] if options[:description]
59 post[:email] = options[:email] if options[:email]
60 customer = commit(:post, 'customers', post, options)
61 customer_id = customer.params['id']

Why do we observe this now, and not from staging the RSpec bump #9850?

I don't know. For some reason, some PR's I've staged yesterday did not reflect all changes in master (see this example). This can be due to:

  • Caching issue?
  • something with deployments?
  • something at the staging-server AU?

I'm not sure. In any case, the error was triggered now on staging-UK, so, I think we're still not ready for this bump.

@filipefurtad0 filipefurtad0 removed the pr-staged-uk staging.openfoodnetwork.org.uk label Feb 2, 2023
@dacook dacook marked this pull request as draft February 2, 2023 22:11
@dacook
Copy link
Member

dacook commented Feb 2, 2023

I'm glad you double-checked, thanks @filipefurtad0 ! Great work on documenting the findings. Looks like we need to be careful with this one.

@dependabot dependabot bot force-pushed the dependabot/bundler/activemerchant-1.126.0 branch 2 times, most recently from 824c4a1 to c0cd824 Compare February 13, 2023 13:14
@dependabot dependabot bot force-pushed the dependabot/bundler/activemerchant-1.126.0 branch from c0cd824 to 4802f49 Compare March 14, 2023 14:09
@dependabot dependabot bot force-pushed the dependabot/bundler/activemerchant-1.126.0 branch from 4802f49 to add7f03 Compare March 23, 2023 12:05
@filipefurtad0
Copy link
Contributor

@dependabot rebase

Bumps [activemerchant](https://github.com/activemerchant/active_merchant) from 1.123.0 to 1.126.0.
- [Release notes](https://github.com/activemerchant/active_merchant/releases)
- [Changelog](https://github.com/activemerchant/active_merchant/blob/master/CHANGELOG)
- [Commits](activemerchant/active_merchant@v1.123.0...v1.126.0)

---
updated-dependencies:
- dependency-name: activemerchant
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/bundler/activemerchant-1.126.0 branch from add7f03 to 632d701 Compare April 13, 2023 08:50
@filipefurtad0 filipefurtad0 marked this pull request as ready for review April 13, 2023 08:56
@filipefurtad0 filipefurtad0 marked this pull request as draft April 13, 2023 08:56
@filipefurtad0
Copy link
Contributor

Marked ready for review by mistake - undid this now.

@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github May 4, 2023

Superseded by #10801.

@dependabot dependabot bot closed this May 4, 2023
@dependabot dependabot bot deleted the dependabot/bundler/activemerchant-1.126.0 branch May 4, 2023 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked dependencies ruby Pull requests that update Ruby code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants