diff --git a/CHANGELOG.md b/CHANGELOG.md index 733ae43..287dd4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,11 @@ # Changelog -## Latest Version - v13.0.0 (08/22/24) +## Latest Version - v13.0.1 (09/19/24) +### Enhancements: +- [GP-API] Send "cvv" in create transaction request with a tokenized card + +## v13.0.0 (08/22/24) ### Enhancements: - [UPA] Add new UPA commands @@ -17,7 +21,7 @@ ### Bug Fixes: - [GP-API] Fix re-sign in after token expiration -## Latest Version - v12.0.7 (07/16/24) +## v12.0.7 (07/16/24) ### Enhancements: - [GP-API] Adds avs data to "/transaction" request for digital wallet - [GP-API] Adds brand reference and stage time to the DisputeSummary @@ -25,7 +29,7 @@ ### Bug Fixes: - [PAX] Correction to tip/gratuity handling in the request to device -## Latest Version - v12.0.6 (06/18/24) +## v12.0.6 (06/18/24) ### Enhancements: - [GP-ECOM] Add Multi-Capture diff --git a/metadata.xml b/metadata.xml index b538a7f..769ce74 100644 --- a/metadata.xml +++ b/metadata.xml @@ -1,3 +1,3 @@ - 13.0.0 + 13.0.1 \ No newline at end of file diff --git a/src/Builders/RequestBuilder/GpApi/GpApiAuthorizationRequestBuilder.php b/src/Builders/RequestBuilder/GpApi/GpApiAuthorizationRequestBuilder.php index fca5222..db810b9 100644 --- a/src/Builders/RequestBuilder/GpApi/GpApiAuthorizationRequestBuilder.php +++ b/src/Builders/RequestBuilder/GpApi/GpApiAuthorizationRequestBuilder.php @@ -567,6 +567,10 @@ private function createPaymentMethodParam($builder, $config) )) { if ($paymentMethodContainer instanceof ITokenizable && !empty($paymentMethodContainer->token)) { $paymentMethod->id = $paymentMethodContainer->token; + if (!empty($paymentMethodContainer->cvn)) { + $paymentMethod->card = new Card(); + $paymentMethod->card->cvv = $paymentMethodContainer->cvn; + } } if (is_null($paymentMethod->id)) { diff --git a/test/Integration/Gateways/GpApiConnector/CreditCardNotPresentTest.php b/test/Integration/Gateways/GpApiConnector/CreditCardNotPresentTest.php index 3c49311..3310a58 100644 --- a/test/Integration/Gateways/GpApiConnector/CreditCardNotPresentTest.php +++ b/test/Integration/Gateways/GpApiConnector/CreditCardNotPresentTest.php @@ -537,6 +537,7 @@ public function testCardTokenizationThenPayingWithToken_SingleToMultiUse() $tokenizedCard = new CreditCardData(); $tokenizedCard->token = $tokenId; $tokenizedCard->cardHolderName = "James Mason"; + $tokenizedCard->cvn = '123'; $response = $tokenizedCard->charge(10) ->withCurrency("USD") diff --git a/test/Integration/Gateways/GpApiConnector/GpApiPayByLinkTest.php b/test/Integration/Gateways/GpApiConnector/GpApiPayByLinkTest.php index 241f783..c852bc3 100644 --- a/test/Integration/Gateways/GpApiConnector/GpApiPayByLinkTest.php +++ b/test/Integration/Gateways/GpApiConnector/GpApiPayByLinkTest.php @@ -56,7 +56,7 @@ public static function tearDownAfterClass(): void BaseGpApiTestConfig::resetGpApiConfig(); } - public function setup() : void + public function setup(): void { ServicesContainer::configureService($this->setUpConfig()); $this->startDate = (new DateTime())->modify('-30 days')->setTime(0, 0, 0); @@ -809,6 +809,7 @@ public function testFindPayByLinkByAmount() $this->assertInstanceOf(PayByLinkSummary::class, $randomPayByLink); $this->assertEquals($amount, $randomPayByLink->amount); } + public function testFindPayByLinkByExpireDate() { $date = new DateTime('2024-05-09'); @@ -839,16 +840,6 @@ private function assertPayByLinkResponse(Transaction $response): void private function setupTransactionConfig(): GpApiConfig { - $configTrn = new GpApiConfig(); - $configTrn->appId = 'oDVjAddrXt3qPJVPqQvrmgqM2MjMoHQS'; - $configTrn->appKey = 'DHUGdzpjXfTbjZeo'; - $configTrn->channel = Channel::CardNotPresent; - $configTrn->country = 'GB'; - $configTrn->challengeNotificationUrl = 'https://ensi808o85za.x.pipedream.net/'; - $configTrn->methodNotificationUrl = 'https://ensi808o85za.x.pipedream.net/'; - $configTrn->merchantContactUrl = 'https://enp4qhvjseljg.x.pipedream.net/'; - $configTrn->requestLogger = new SampleRequestLogger(new Logger("logs")); - - return $configTrn; + return BaseGpApiTestConfig::gpApiSetupConfig(Channel::CardNotPresent); } } \ No newline at end of file