From cf81a94834fab0576c7d9c5bad9c3d6fa9f88149 Mon Sep 17 00:00:00 2001 From: Stefan Mueller Date: Tue, 11 May 2021 12:39:25 +0200 Subject: [PATCH] SW-356: amazonpay: added basket refresh to prevent wrong surcharges after payment change --- .../Controllers/Frontend/MoptPaymentAmazon.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Frontend/MoptPaymentPayone/Controllers/Frontend/MoptPaymentAmazon.php b/Frontend/MoptPaymentPayone/Controllers/Frontend/MoptPaymentAmazon.php index 762298c0..fb9b1e7a 100755 --- a/Frontend/MoptPaymentPayone/Controllers/Frontend/MoptPaymentAmazon.php +++ b/Frontend/MoptPaymentPayone/Controllers/Frontend/MoptPaymentAmazon.php @@ -24,6 +24,8 @@ public function init() $this->session = Shopware()->Session(); $this->plugin = Shopware()->Container()->get('plugins')->Frontend()->MoptPaymentPayone(); $this->basket = Shopware()->Modules()->Basket(); + $this->admin->sSYSTEM->_POST['sPayment'] = Shopware()->Container()->get('MoptPayoneMain')->getPaymentHelper()->getPaymentAmazonPay()->getId(); + $this->admin->sUpdatePayment(Shopware()->Container()->get('MoptPayoneMain')->getPaymentHelper()->getPaymentAmazonPay()->getId()); } /** @@ -71,6 +73,7 @@ public function indexAction() $userAdditionalArray['additional']['countryShipping'] = $userData['additional']['countryShipping']; $this->View()->assign('sUserData', $userAdditionalArray); + $this->get('modules')->Basket()->sRefreshBasket(); $basket = $this->get('modules')->Basket()->sGetBasket(); if ($this->Request()->getParam("sDispatch")) {