View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0007334 | module Amazon Pay | main | public | 2022-07-12 15:07 | 2022-07-21 13:09 |
Reporter | [email protected] | Assigned To | |||
Priority | high | Severity | crash | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Fixed in Version | 1.2.0 | ||||
Summary | 0007334: Amazon Pay bug: Basket gets lost if AmazonPay user exists already | ||||
Description | There is an unexpected behavior caused by the Amazon Pay module in the latest version (https://github.com/OXID-eSales/amazon-pay-module/tree/v1.1.3). When you get redirected from Amazon back to your shop and the user can't be registered because there already is an user with the same email address and a password, the basket gets deleted. | ||||
Steps To Reproduce | - create an account in the shop with the same email address as your amazon account (user with password) - logout from the shop - add a product to the basket - go to basket page - click the Amazon Pay button to get redirected to the Amazon login page - login with your Amazon account - click "continue to checkout" to get redirected to the shop - you get to the user page (checkout step 2) and the error page "An account already exists for email address..." shows up - during the page load the logout function from OXID was called and the basket was deleted | ||||
Additional Information | Could be fixed with the following changes in the method UserComponent::createGuestUser() // before $this->registerUser() has been called $basket = Registry::getSession()->getBasket(); // existing code: basket will be deleted if user registration failed $registrationResult = $this->registerUser(); // after $this->registerUser() was called if (!$registrationResult && $basket && $basket->getProductsCount() > 0) { $basket->resetUserInfo(); $basket->onUpdate(); Registry::getSession()->setBasket($basket); } | ||||
Tags | No tags attached. | ||||