@if (
request()->routeIs('shop.checkout.onepage.index')
&& (bool) core()->getConfigData('sales.payment_methods.paypal_smart_button.active')
)
@php
$clientId = core()->getConfigData('sales.payment_methods.paypal_smart_button.client_id');
$acceptedCurrency = core()->getConfigData('sales.payment_methods.paypal_smart_button.accepted_currencies');
$currentCurrency = core()->getCurrentCurrencyCode();
$acceptedCurrenciesArray = array_map('trim', explode(',', $acceptedCurrency));
$currencyToUse = in_array($currentCurrency, $acceptedCurrenciesArray)
? $currentCurrency
: $acceptedCurrenciesArray[0];
@endphp
@pushOnce('scripts')
@endPushOnce
@endif