Adyen / adyen-magento2-express-checkout

Adyen Magento 2 Express Checkout Module
MIT License
8 stars 2 forks source link

[ECP-8770-v2] Fix shipping method parsing error #72

Closed candemiralp closed 5 months ago

candemiralp commented 6 months ago

Summary

Adobe Commerce provides the opportunity to show the shopping method even though it's not available for the given card. This behaviour can be applied by setting the value of Configuration / Sales / Shipping Method / Free Shipping / Show Method if Not Applicable config field to Yes.

Even though the shipping method is transferred to the frontend, method_code of this shipping method will be empty. This triggers the issue of undefined method_code.

This PR solves this issue by unsetting the shipping method if it's not available just by checking the value of available property.

Tested scenarios

sonarcloud[bot] commented 5 months ago

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud