From 8643a27d41b36df942e123c4ecfc49385cdb914d Mon Sep 17 00:00:00 2001 From: "David.Owusu" Date: Thu, 17 Sep 2020 11:02:06 +0200 Subject: [PATCH] [fix] Response handling of scheduledSubscriptionPayment. --- .../abstracts/abstract-wc-heidelpay-payment-gateway.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/includes/abstracts/abstract-wc-heidelpay-payment-gateway.php b/includes/abstracts/abstract-wc-heidelpay-payment-gateway.php index 945d0b0..f9b3a0e 100644 --- a/includes/abstracts/abstract-wc-heidelpay-payment-gateway.php +++ b/includes/abstracts/abstract-wc-heidelpay-payment-gateway.php @@ -659,9 +659,15 @@ public function setPaymentInfo(WC_Order $order, Response $response) $connector = $response->getConnector(); $presentation = $response->getPresentation(); + $presentationAmount = number_format( + $presentation->getAmount(), + wc_get_price_decimals(), + wc_get_price_decimal_separator(), + wc_get_price_thousand_separator() + ); $paymentData = [ - '{AMOUNT}' => $presentation->getAmount(), + '{AMOUNT}' => $presentationAmount, '{CURRENCY}' => $presentation->getCurrency(), '{CONNECTOR_ACCOUNT_HOLDER}' => $connector->getAccountHolder(), '{CONNECTOR_ACCOUNT_IBAN}' => $connector->getAccountIBan(),