From ff569a2f56838f6efc0708485a7894166c98bdd3 Mon Sep 17 00:00:00 2001 From: Julien Date: Fri, 29 May 2020 08:59:26 +0200 Subject: [PATCH] prestashop validator --- controllers/front/stripeCards.php | 2 +- stripe_official.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/controllers/front/stripeCards.php b/controllers/front/stripeCards.php index 63cf70f..bf68019 100755 --- a/controllers/front/stripeCards.php +++ b/controllers/front/stripeCards.php @@ -44,7 +44,7 @@ public function initContent() foreach ($allCards as &$card) { $card->card->exp_month = sprintf('%02d', $card->card->exp_month); - $card->card->exp_year = substr($card->card->exp_year, -2); + $card->card->exp_year = Tools::substr($card->card->exp_year, -2); } } } diff --git a/stripe_official.php b/stripe_official.php index 0b840c3..96e159b 100644 --- a/stripe_official.php +++ b/stripe_official.php @@ -1401,7 +1401,7 @@ public function hookPayment($params) $this->context->smarty->assign(array( 'id_payment_method' => $card->id, 'last4' => $card->card->last4, - 'brand' => ucfirst($card->card->brand) + 'brand' => Tools::ucfirst($card->card->brand) )); $display .= $this->display(__FILE__, 'views/templates/front/payment_form_save_card.tpl'); @@ -1548,7 +1548,7 @@ public function hookPaymentOptions($params) $option = new \PrestaShop\PrestaShop\Core\Payment\PaymentOption(); $option ->setModuleName($this->name) - ->setCallToActionText($this->button_label['save_card'].' : '.ucfirst($card->card->brand).' **** **** **** '.$card->card->last4); + ->setCallToActionText($this->button_label['save_card'].' : '.Tools::ucfirst($card->card->brand).' **** **** **** '.$card->card->last4); $this->context->smarty->assign(array( 'id_payment_method' => $card->id