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

Update PaymentMethods.php #1340

Merged
merged 4 commits into from Feb 11, 2022
Merged

Conversation

Prunecreation
Copy link
Contributor

@Prunecreation Prunecreation commented Feb 2, 2022

Add an \Adyen\ConnectionException catch in case the curl request failed (if the live endPoint is misconfigured)

Description
If the Live endPoint is misconfigured in the Magento2 module Backoffice, on the checkout page the CURL request to retrieve Adyen Payment raise an \Adyen\ConnectionException, but the getPaymentMethodsResponse in Helper/PaymentMethods.php is only catching \Adyen\AdyenException => so the Ajax call never return response and the checkout freeze when getting payment method.

Tested scenarios

  • Add a wrong live Endpoint in the Magento2 Adyen module back office
  • Clean the cache
  • On the frontend, add some product to your cart and go to the checkout page
  • Magento doesn't show the payment methods because the Adyen Ajax call failed

Fixed issue: add an \Adyen\ConnectionException catch to handle failed CURL request

Add an \Adyen\ConnectionException catch in case the curl request failed (if the live endPoint is misconfigured)
Copy link
Member

@acampos1916 acampos1916 left a comment

Choose a reason for hiding this comment

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

Thanks for this contribution @Prunecreation, I made a small suggestion for consistency.

Co-authored-by: Ángel Campos <acampos1916@gmail.com>
@sonarcloud
Copy link

sonarcloud bot commented Feb 11, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@acampos1916 acampos1916 merged commit e5e39aa into Adyen:develop Feb 11, 2022
@Morerice Morerice mentioned this pull request Apr 4, 2022
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.

None yet

3 participants