diff --git a/examples/BankSelection.php b/examples/BankSelection.php index 98da5d2..7b86dfd 100644 --- a/examples/BankSelection.php +++ b/examples/BankSelection.php @@ -7,7 +7,7 @@ include_once 'config.php'; include_once 'loader.php'; -class BankSelectionExample extends PaymentBasicForms +final class BankSelectionExample extends PaymentBasicForms { public function __construct() { diff --git a/examples/BankSelectionAPI.php b/examples/BankSelectionAPI.php index 12da855..41768b6 100644 --- a/examples/BankSelectionAPI.php +++ b/examples/BankSelectionAPI.php @@ -7,7 +7,7 @@ include_once 'config.php'; include_once 'loader.php'; -class BankSelectionAPIExample extends PaymentBasicForms +final class BankSelectionAPIExample extends PaymentBasicForms { public function __construct() { diff --git a/examples/BasicPaymentForm.php b/examples/BasicPaymentForm.php index 3fb2dc5..0e685e2 100644 --- a/examples/BasicPaymentForm.php +++ b/examples/BasicPaymentForm.php @@ -7,7 +7,7 @@ include_once 'config.php'; include_once 'loader.php'; -class TpayBasicExample extends PaymentBasicForms +final class TpayBasicExample extends PaymentBasicForms { public function __construct() { diff --git a/examples/BlikTransactionExample.php b/examples/BlikTransactionExample.php index fee8bc9..44a40fd 100644 --- a/examples/BlikTransactionExample.php +++ b/examples/BlikTransactionExample.php @@ -8,7 +8,7 @@ include_once 'config.php'; include_once 'loader.php'; -class BlikTransactionExample extends PaymentBlik +final class BlikTransactionExample extends PaymentBlik { public function __construct() { diff --git a/examples/CardBasic.php b/examples/CardBasic.php index bf27552..31d0fe5 100644 --- a/examples/CardBasic.php +++ b/examples/CardBasic.php @@ -8,7 +8,7 @@ include_once 'config.php'; include_once 'loader.php'; -class CardBasic extends PaymentCardForms +final class CardBasic extends PaymentCardForms { public function __construct() { diff --git a/examples/CardGate.php b/examples/CardGate.php index 0640aa0..514b843 100644 --- a/examples/CardGate.php +++ b/examples/CardGate.php @@ -9,7 +9,7 @@ include_once 'config.php'; include_once 'loader.php'; -class CardGate extends PaymentCardForms +final class CardGate extends PaymentCardForms { public function __construct() { diff --git a/examples/CardGateExtended.php b/examples/CardGateExtended.php index 3f4d107..397c16c 100644 --- a/examples/CardGateExtended.php +++ b/examples/CardGateExtended.php @@ -9,7 +9,7 @@ include_once 'config.php'; include_once 'loader.php'; -class CardGateExtended extends PaymentCardForms +final class CardGateExtended extends PaymentCardForms { const SUPPORTED_CARD_VENDORS = [ 'visa', @@ -32,7 +32,7 @@ public function init() { if (isset($_POST['carddata'])) { $this->setPaymentParameters(); - if (isset($_POST['card_vendor']) && in_array($_POST['card_vendor'], static::SUPPORTED_CARD_VENDORS)) { + if (isset($_POST['card_vendor']) && in_array($_POST['card_vendor'], self::SUPPORTED_CARD_VENDORS)) { $this->saveUserCardVendor($_POST['card_vendor']); } // Try to sale with provided card data diff --git a/examples/CardNotification.php b/examples/CardNotification.php index e72e71f..c303d28 100644 --- a/examples/CardNotification.php +++ b/examples/CardNotification.php @@ -7,7 +7,7 @@ include_once 'config.php'; include_once 'loader.php'; -class CardNotification extends CardNotificationHandler +final class CardNotification extends CardNotificationHandler { public function __construct() { diff --git a/examples/CardPaymentLinkBuilder.php b/examples/CardPaymentLinkBuilder.php index 130b495..b36078d 100644 --- a/examples/CardPaymentLinkBuilder.php +++ b/examples/CardPaymentLinkBuilder.php @@ -8,7 +8,7 @@ include_once 'config.php'; include_once 'loader.php'; -class CardPaymentLinkBuilder extends PaymentCardForms +final class CardPaymentLinkBuilder extends PaymentCardForms { const REQUIRED_FIELDS = [ 'name', @@ -63,8 +63,8 @@ public function init() public function showBuilderForm() { - $data['currencies'] = static::ALLOWED_CURRENCIES; - $data['languages'] = static::ALLOWED_LANGUAGES; + $data['currencies'] = self::ALLOWED_CURRENCIES; + $data['languages'] = self::ALLOWED_LANGUAGES; $data['actionPath'] = ''; echo $this->getCardPaymentLinkBuilderForm($data); } @@ -72,7 +72,7 @@ public function showBuilderForm() public function getCardPaymentLink() { try { - foreach (static::REQUIRED_FIELDS as $fieldName) { + foreach (self::REQUIRED_FIELDS as $fieldName) { if (!isset($_POST[$fieldName])) { throw new TException(sprintf('Required field %s is missing', $fieldName)); } diff --git a/examples/CardRefundExample.php b/examples/CardRefundExample.php index 42e9107..5bc326a 100644 --- a/examples/CardRefundExample.php +++ b/examples/CardRefundExample.php @@ -7,7 +7,7 @@ include_once 'config.php'; include_once 'loader.php'; -class CardRefundExample extends CardRefunds +final class CardRefundExample extends CardRefunds { public function __construct() { diff --git a/examples/MassPayment.php b/examples/MassPayment.php index 5db35b0..b5e66e6 100644 --- a/examples/MassPayment.php +++ b/examples/MassPayment.php @@ -8,7 +8,7 @@ include_once 'config.php'; include_once 'loader.php'; -class MassPaymentExample extends MassPayments +final class MassPaymentExample extends MassPayments { const TRID = 'TR-C4Y-HJVWYX'; @@ -44,7 +44,7 @@ public function transferMassPayment() * Masspayment transfer */ $packId = '123123'; - $transactionId = static::TRID; + $transactionId = self::TRID; try { $result = $this->massPaymentTransfers($packId, $transactionId); print_r($result); diff --git a/examples/RecurrentPayment.php b/examples/RecurrentPayment.php index 63b6776..8d77e55 100644 --- a/examples/RecurrentPayment.php +++ b/examples/RecurrentPayment.php @@ -7,7 +7,7 @@ include_once 'config.php'; include_once 'loader.php'; -class RecurrentPayment extends PaymentCard +final class RecurrentPayment extends PaymentCard { private $transactionId; diff --git a/examples/SmsNotification.php b/examples/SmsNotification.php index beb3cc3..06e36b5 100644 --- a/examples/SmsNotification.php +++ b/examples/SmsNotification.php @@ -7,7 +7,7 @@ include_once 'config.php'; include_once 'loader.php'; -class SmsNotification extends PaymentSMS +final class SmsNotification extends PaymentSMS { public function __construct() { diff --git a/examples/TransactionApiExample.php b/examples/TransactionApiExample.php index a48690b..c606641 100644 --- a/examples/TransactionApiExample.php +++ b/examples/TransactionApiExample.php @@ -8,7 +8,7 @@ include_once 'config.php'; include_once 'loader.php'; -class TransactionApiExample extends TransactionApi +final class TransactionApiExample extends TransactionApi { private $trId; diff --git a/examples/TransactionNotification.php b/examples/TransactionNotification.php index bb5d274..9966253 100644 --- a/examples/TransactionNotification.php +++ b/examples/TransactionNotification.php @@ -7,7 +7,7 @@ include_once 'config.php'; include_once 'loader.php'; -class TransactionNotification extends BasicNotificationHandler +final class TransactionNotification extends BasicNotificationHandler { public function __construct() { diff --git a/examples/TransactionRefund.php b/examples/TransactionRefund.php index d649eb9..4b9229a 100644 --- a/examples/TransactionRefund.php +++ b/examples/TransactionRefund.php @@ -8,7 +8,7 @@ include_once 'config.php'; include_once 'loader.php'; -class TransactionRefund extends BasicRefunds +final class TransactionRefund extends BasicRefunds { const TRID = 'TR-C4Y-HKR3HX'; @@ -29,7 +29,7 @@ public function refundAnyTransaction() $amount = 100.00; try { - $this->transactionID = static::TRID; + $this->transactionID = self::TRID; $result = $this->refundAny($amount); print_r($result); } catch (TException $e) { @@ -41,7 +41,7 @@ public function refundTransaction() { // Refund transaction try { - $this->transactionID = static::TRID; + $this->transactionID = self::TRID; $result = $this->refund(); print_r($result); } catch (TException $e) { diff --git a/examples/TransactionRefundStatus.php b/examples/TransactionRefundStatus.php index 50a8b7e..ee0873c 100644 --- a/examples/TransactionRefundStatus.php +++ b/examples/TransactionRefundStatus.php @@ -8,7 +8,7 @@ include_once 'config.php'; include_once 'loader.php'; -class TransactionRefundStatus extends BasicReports +final class TransactionRefundStatus extends BasicReports { const TRID = 'TR-BRA-KGZK0X'; @@ -24,7 +24,7 @@ public function __construct() public function getTransactionRefundsStatuses() { try { - $this->transactionID = static::TRID; + $this->transactionID = self::TRID; $result = $this->transactionRefundStatus(); var_dump($result); } catch (TException $e) { diff --git a/examples/TransactionReportsApi.php b/examples/TransactionReportsApi.php index a271d9b..1725b16 100644 --- a/examples/TransactionReportsApi.php +++ b/examples/TransactionReportsApi.php @@ -8,7 +8,7 @@ include_once 'config.php'; include_once 'loader.php'; -class TransactionReportsApi extends BasicReports +final class TransactionReportsApi extends BasicReports { public function __construct() {