Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Commit

Permalink
Merge pull request #38 from heidelpay/fix/presentation_amount_format
Browse files Browse the repository at this point in the history
[fix] Response handling of scheduledSubscriptionPayment.
  • Loading branch information
Ryouzanpaku authored Sep 17, 2020
2 parents 4900c4b + 8643a27 commit 0478495
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion includes/abstracts/abstract-wc-heidelpay-payment-gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 0478495

Please sign in to comment.