Skip to content

Commit

Permalink
Extend payment method configuration
Browse files Browse the repository at this point in the history
ISSUE: ADCRSET1G-18
  • Loading branch information
Tamara committed Apr 16, 2024
1 parent 8c443eb commit 4195177
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion src/classes/Services/CheckoutHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
use Context;
use Country as PrestaCountry;
use Currency as PrestaCurrency;
use Customer as PrestaCustomer;
use Module;
use PrestaShopDatabaseException;
use PrestaShopException;
Expand All @@ -47,6 +48,7 @@ public static function getPaymentCheckoutConfig(PrestaCart $cart)
$currency = new PrestaCurrency($cart->id_currency);
$addressInvoice = new PrestaAddress($cart->id_address_invoice);
$country = new PrestaCountry($addressInvoice->id_country);
$customer = new PrestaCustomer($cart->id_customer);
$shop = \Shop::getShop(\Context::getContext()->shop->id);

return CheckoutAPI::get()->checkoutConfig($cart->id_shop)->getPaymentCheckoutConfig(
Expand All @@ -59,7 +61,8 @@ public static function getPaymentCheckoutConfig(PrestaCart $cart)
),
$country->iso_code ? Country::fromIsoCode($country->iso_code) : null,
Context::getContext()->getTranslator()->getLocale(),
$shop['domain'] . '_' . \Context::getContext()->shop->id . '_' . $cart->id_customer
$shop['domain'] . '_' . \Context::getContext()->shop->id . '_' . $cart->id_customer,
$customer->email
)
);
}
Expand Down
8 changes: 4 additions & 4 deletions src/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4195177

Please sign in to comment.