Adyen / adyen-magento2-express-checkout

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

[ECP-9230] Prevent refreshing Quote ID during page refresh on product page for express payment #93

Open SushmitaThakur opened 2 weeks ago

SushmitaThakur commented 2 weeks ago

Summary

On product page for express checkouts, the quote-id is being created every time the page is refreshed on the browser and as a result a multiple entries exist in the quote table for the same product. This happens for both logged in or guest user where quote id is maintained for the session but not through refresh. This PR includes storing the quote-id to JS local storage variable and accessing it whenever getRequest method is called, to check whether there is an existing quote-id, if not then let getRequest create a new one.

Tested scenarios

  1. Quote-id is retained on page refresh
  2. On visiting a different product page than the current one, the previous quote-id is removed

Fixed issue:

sonarcloud[bot] commented 2 weeks ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

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

See analysis details on SonarCloud