Skip to content

Commit 6ecf9a5

Browse files
Ainschyaschempp
authored andcommitted
fix isAvailable function and template name (#2344)
1 parent d41c65c commit 6ecf9a5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

system/modules/isotope/library/Isotope/Model/Payment/PaypalCheckout.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,14 @@
1919
use Isotope\Interfaces\IsotopePurchasableCollection;
2020
use Isotope\Module\Checkout;
2121
use Isotope\Template;
22+
use Isotope\Isotope;
2223
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
2324

2425
class PaypalCheckout extends PaypalApi
2526
{
2627
public function isAvailable(): bool
2728
{
28-
if (!in_array($this->currency, ['AUD', 'BRL', 'CAD', 'CZK', 'DKK', 'EUR', 'HKD', 'HUF', 'ILS', 'JPY', 'MYR', 'MXN', 'TWD', 'NZD', 'NOK', 'PHP', 'PLN', 'GBP', 'RUB', 'SGD', 'SEK', 'CHF', 'THB', 'USD'])) {
29+
if (!in_array(Isotope::getConfig()->currency, ['AUD', 'BRL', 'CAD', 'CZK', 'DKK', 'EUR', 'HKD', 'HUF', 'ILS', 'JPY', 'MYR', 'MXN', 'TWD', 'NZD', 'NOK', 'PHP', 'PLN', 'GBP', 'RUB', 'SGD', 'SEK', 'CHF', 'THB', 'USD'])) {
2930
return false;
3031
}
3132

@@ -57,7 +58,7 @@ public function checkoutForm(IsotopeProductCollection $objOrder, \Module $objMod
5758

5859
foreach ($paypalData['links'] as $link) {
5960
if ('approval_url' === $link['rel']) {
60-
$template = new Template('iso_payment_paypal_paypal');
61+
$template = new Template('iso_payment_paypal_checkout');
6162
$template->setData($this->arrData);
6263

6364
$template->client_id = $this->paypal_client;

0 commit comments

Comments
 (0)