Skip to content

Commit 6f30331

Browse files
authored
Added multicurrency support (#43)
1 parent 47a5992 commit 6f30331

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Src/Controllers/Frontend/CheckoutController.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,11 @@ public function getOrderData($paymentMethod, $formParams = null)
9090
$buyer['zip_code'] = $customer->cPLZ;
9191

9292
$buyer['is_registered'] = $customer->kKunde != null;
93+
94+
$currency = Frontend::getCurrency()->getCode();
9395

9496
$data = [
95-
'currency' => 'EUR',
97+
'currency' => $currency,
9698
'state_flow' => $this->configService->getOrderFlow(),
9799
'payment_method' => $this->getPaymentMethod($paymentMethod),
98100
'gross_amount_cents' => round($basket->total[1] * 100),

Src/Controllers/Frontend/InvoicesController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,11 @@ public function create()
5454
}
5555

5656
$invoiceData = [
57+
'currency' => $bestellung->Waehrung->code,
5758
'order_uuid' => $monduOrder->order_uuid,
5859
'external_reference_id' => (string) $invoiceId,
5960
'invoice_url' => 'http://localhost',
60-
'gross_amount_cents' => round(round(floatval($bestellung->fGesamtsumme), 2) * 100),
61+
'gross_amount_cents' => round(round(floatval($bestellung->fGesamtsummeKundenwaehrung), 2) * 100),
6162
'line_items' => $invoiceLineItems
6263
];
6364

0 commit comments

Comments
 (0)