From 77c789be356ebe167d669a8446c7930ae673aac3 Mon Sep 17 00:00:00 2001 From: Stefan Reinhardt Date: Fri, 17 Jan 2020 10:29:01 +0100 Subject: [PATCH] Modified plugin to submit amount without decimals --- .../MoptPaymentPayone/Controllers/Frontend/MoptPaymentEcs.php | 4 ++-- .../Controllers/Frontend/MoptPaymentPayone.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Frontend/MoptPaymentPayone/Controllers/Frontend/MoptPaymentEcs.php b/Frontend/MoptPaymentPayone/Controllers/Frontend/MoptPaymentEcs.php index 91b2b3f7..c917e30f 100755 --- a/Frontend/MoptPaymentPayone/Controllers/Frontend/MoptPaymentEcs.php +++ b/Frontend/MoptPaymentPayone/Controllers/Frontend/MoptPaymentEcs.php @@ -31,7 +31,7 @@ public function initPaymentAction() $paramBuilder = $this->moptPayone__main->getParamBuilder(); $userData = $this->getUserData(); - $amount = $this->getBasketAmount($userData); + $amount = round($this->getBasketAmount($userData), 0); $expressCheckoutRequestData = $paramBuilder->buildPayPalExpressCheckout( $paymentId, @@ -80,7 +80,7 @@ public function ecsAction() $paramBuilder = $this->moptPayone__main->getParamBuilder(); $userData = $this->getUserData(); - $amount = $this->getBasketAmount($userData); + $amount = round($this->getBasketAmount($userData), 0); $expressCheckoutRequestData = $paramBuilder->buildPayPalExpressCheckoutDetails( $paymentId, diff --git a/Frontend/MoptPaymentPayone/Controllers/Frontend/MoptPaymentPayone.php b/Frontend/MoptPaymentPayone/Controllers/Frontend/MoptPaymentPayone.php index e0995273..2abcd0e2 100755 --- a/Frontend/MoptPaymentPayone/Controllers/Frontend/MoptPaymentPayone.php +++ b/Frontend/MoptPaymentPayone/Controllers/Frontend/MoptPaymentPayone.php @@ -908,7 +908,7 @@ protected function buildAndCallPayment($config, $clearingType, $payment, $worker $request = $this->mopt_payone__prepareRequest($config['paymentId'], $session->moptIsAuthorized); $currency = $this->moptGetCurrency(); - $request->setAmount($this->getAmount()); + $request->setAmount(round($this->getAmount(), 0)); $request->setCurrency($currency); //get shopware temporary order id - session id