From 4bbafa7b5061c0b447637229bcf02b3ff2188e3a Mon Sep 17 00:00:00 2001 From: KA Date: Thu, 8 Apr 2021 09:49:51 +0200 Subject: [PATCH 1/3] Replacing not existing in php 5.6 contstant RFC3339_EXTENDED --- src/Gateways/Gp3DSProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Gateways/Gp3DSProvider.php b/src/Gateways/Gp3DSProvider.php index 7b8bb057..c13f2ab0 100644 --- a/src/Gateways/Gp3DSProvider.php +++ b/src/Gateways/Gp3DSProvider.php @@ -184,7 +184,7 @@ public function processSecure3d(Secure3dBuilder $builder) $request['order'] = $this->maybeSetKey($request['order'], 'currency', $builder->getCurrency()); $request['order'] = $this->maybeSetKey($request['order'], 'id', $orderId); $request['order'] = $this->maybeSetKey($request['order'], 'address_match_indicator', ($builder->isAddressMatchIndicator() ? true : false)); - $request['order'] = $this->maybeSetKey($request['order'], 'date_time_created', (new \DateTime($builder->getOrderCreateDate()))->format(\DateTime::RFC3339_EXTENDED)); + $request['order'] = $this->maybeSetKey($request['order'], 'date_time_created', (new \DateTime($builder->getOrderCreateDate()))->format('Y-m-d\TH:i:s.P')); $request['order'] = $this->maybeSetKey($request['order'], 'gift_card_count', $builder->getGiftCardCount()); $request['order'] = $this->maybeSetKey($request['order'], 'gift_card_currency', $builder->getGiftCardCurrency()); $request['order'] = $this->maybeSetKey($request['order'], 'gift_card_amount', preg_replace('/[^0-9]/', '', sprintf('%01.2f', $builder->getGiftCardAmount()))); From 1f373253898ed5f1e187962cc648e075dcbaa946 Mon Sep 17 00:00:00 2001 From: Dawid Kowalski Date: Thu, 8 Apr 2021 11:09:33 +0200 Subject: [PATCH 2/3] Change name of project --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index c39787b1..a443b2f8 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "globalpayments/php-sdk", + "name": "anurit/php-sdk", "description": "PHP SDK for processing payments with Global Payments, including Heartland Payment Systems and Realex Payments", "keywords": [ ], From f08300b6db1b80d4d33b2abecdaf30e566f4d623 Mon Sep 17 00:00:00 2001 From: michal koryzna Date: Thu, 10 Jun 2021 13:02:00 +0100 Subject: [PATCH 3/3] Fix using float in array_key_exits - not compatible with PHP 5 (compatible from PHP >= 8) --- composer.json | 2 +- src/Builders/BaseBuilder/Validations.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index a443b2f8..c39787b1 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "anurit/php-sdk", + "name": "globalpayments/php-sdk", "description": "PHP SDK for processing payments with Global Payments, including Heartland Payment Systems and Realex Payments", "keywords": [ ], diff --git a/src/Builders/BaseBuilder/Validations.php b/src/Builders/BaseBuilder/Validations.php index a9773a03..9661bad9 100644 --- a/src/Builders/BaseBuilder/Validations.php +++ b/src/Builders/BaseBuilder/Validations.php @@ -35,6 +35,7 @@ public function __construct() */ public function of($type, $modifier = TransactionModifier::NONE) { + $type = (string) $type; if (!array_key_exists($type, $this->rules)) { $this->rules[$type] = []; }