Skip to content

Commit

Permalink
fix isAvailable function and template name (#2344)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ainschy authored and aschempp committed Jul 19, 2023
1 parent ef514d6 commit 09977e3
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@
use Isotope\Interfaces\IsotopePurchasableCollection;
use Isotope\Module\Checkout;
use Isotope\Template;
use Isotope\Isotope;
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;

class PaypalCheckout extends PaypalApi
{
public function isAvailable(): bool
{
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'])) {
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'])) {
return false;
}

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

foreach ($paypalData['links'] as $link) {
if ('approval_url' === $link['rel']) {
$template = new Template('iso_payment_paypal_paypal');
$template = new Template('iso_payment_paypal_checkout');
$template->setData($this->arrData);

$template->client_id = $this->paypal_client;
Expand Down

0 comments on commit 09977e3

Please sign in to comment.