From ae48ac33d02ff624c9f0695b16ef15968d5c111a Mon Sep 17 00:00:00 2001 From: Shahbaz Date: Tue, 14 Jan 2025 19:15:24 +0500 Subject: [PATCH 1/3] Include AuthenticationResult in Transaction class --- CHANGELOG.md | 4 ++ src/AbstractApi.php | 2 +- src/Response/Embeds/AuthenticationResult.php | 54 ++++++++++++++++++++ src/Response/Embeds/Transaction.php | 9 ++++ 4 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 src/Response/Embeds/AuthenticationResult.php diff --git a/CHANGELOG.md b/CHANGELOG.md index bba235d..3670e35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.4.6] - 2025-01-14 +### Added +- Include `AuthenticationResult` in `Transaction` class. + ## [3.4.5] - 2024-11-05 ### Added - Include `MerchantErrorMessage`, `CardHolderErrorMessage`, `CardHolderErrorMessage` and `CardHolderErrorMessage` in `CaptureReservationResponse` class. diff --git a/src/AbstractApi.php b/src/AbstractApi.php index 684df67..5f7a543 100644 --- a/src/AbstractApi.php +++ b/src/AbstractApi.php @@ -55,7 +55,7 @@ abstract class AbstractApi /** * PHP API version */ - const PHP_API_VERSION = '3.4.5'; + const PHP_API_VERSION = '3.4.6'; /** * Event dispatcher diff --git a/src/Response/Embeds/AuthenticationResult.php b/src/Response/Embeds/AuthenticationResult.php new file mode 100644 index 0000000..70528d6 --- /dev/null +++ b/src/Response/Embeds/AuthenticationResult.php @@ -0,0 +1,54 @@ + [ 'class' => CardInformation::class, 'array' => false + ], + 'AuthenticationResult' => [ + 'class' => AuthenticationResult::class, + 'array' => false ] ]; @@ -285,6 +289,11 @@ class Transaction extends AbstractResponse */ public $InvoiceOrderInfo; + /** + * @var string + */ + public $AuthenticationResult; + /** * @param string $IsTokenized * From 97207dc151cd314771df2de099b34f4980590e55 Mon Sep 17 00:00:00 2001 From: Shahbaz Date: Thu, 16 Jan 2025 19:58:55 +0500 Subject: [PATCH 2/3] Update DocBlock to add possible values --- src/Response/Embeds/AuthenticationResult.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Response/Embeds/AuthenticationResult.php b/src/Response/Embeds/AuthenticationResult.php index 70528d6..d3f5ebd 100644 --- a/src/Response/Embeds/AuthenticationResult.php +++ b/src/Response/Embeds/AuthenticationResult.php @@ -28,27 +28,29 @@ class AuthenticationResult extends AbstractResponse { /** - * @var string + * @var "CHALLENGE"|"FRICTIONLESS"|"UNKNOWN" */ public $Flow; /** - * @var string + * @var "MERCHANT"|"ISSUER"|"UNKNOWN" */ public $Liability; /** - * @var string + * @var "AUTHENTICATED"|"ACCEPTED"|"NOT_AUTHENTICATED"|"FAILED"|"REJECTED"|"INFORMATIONAL"|"UNKNOWN" */ public $Result; /** + * Version in the format X.X.X (e.g. 1.0.0, 2.1.0, 2.2.3). + * * @var string */ public $Version; /** - * @var string + * @var "3DSECURE" */ public $Type; } From 5eac9e3ebc7b88156768c7763b2e5f007c565ccb Mon Sep 17 00:00:00 2001 From: Shahbaz Date: Fri, 17 Jan 2025 01:25:05 +0500 Subject: [PATCH 3/3] Change AuthenticationResult dockBlock --- src/Response/Embeds/Transaction.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Response/Embeds/Transaction.php b/src/Response/Embeds/Transaction.php index b9b4fa8..9cfdf2a 100644 --- a/src/Response/Embeds/Transaction.php +++ b/src/Response/Embeds/Transaction.php @@ -290,7 +290,7 @@ class Transaction extends AbstractResponse public $InvoiceOrderInfo; /** - * @var string + * @var AuthenticationResult */ public $AuthenticationResult;