From 2c6c0c6daa723aac2fce568b69044126cae99a76 Mon Sep 17 00:00:00 2001 From: Lars Harald Hvidsten Date: Tue, 16 Oct 2018 13:40:39 +0200 Subject: [PATCH] Added TransactionReconRef for reconciliation Some acquirers use TransactonReconRef instead of OrderNumber for reconciliation. Removed var_dump from a test. --- src/Message/PurchaseRequest.php | 1 + tests/GatewayTest.php | 3 --- tests/Message/PurchaseRequestTest.php | 1 + 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Message/PurchaseRequest.php b/src/Message/PurchaseRequest.php index 1064f86..b2a8319 100644 --- a/src/Message/PurchaseRequest.php +++ b/src/Message/PurchaseRequest.php @@ -50,6 +50,7 @@ public function getData() $data['merchantId'] = $this->getMerchantId(); $data['token'] = $this->getPassword(); $data['serviceType'] = 'B'; + $data['transactionReconRef'] = $this->getTransactionId(); $data['orderNumber'] = $this->getTransactionId(); $data['currencyCode'] = $this->getCurrency(); $data['amount'] = $this->getAmountInteger(); diff --git a/tests/GatewayTest.php b/tests/GatewayTest.php index 531b740..c10572f 100644 --- a/tests/GatewayTest.php +++ b/tests/GatewayTest.php @@ -99,9 +99,6 @@ public function testCompletePurchaseFailure() $this->assertFalse($response->isSuccessful()); $this->assertFalse($response->isRedirect()); $this->assertNull($response->getTransactionReference()); - - var_dump($response->getMessage()); - $this->assertSame('Unable to find transaction', $response->getMessage()); } diff --git a/tests/Message/PurchaseRequestTest.php b/tests/Message/PurchaseRequestTest.php index a54ba5d..1852b9f 100644 --- a/tests/Message/PurchaseRequestTest.php +++ b/tests/Message/PurchaseRequestTest.php @@ -47,6 +47,7 @@ public function testGetDataWithCard() 'merchantId' => 'MERCH-123', 'token' => 'PASSWORD-123', 'serviceType' => 'B', + 'transactionReconRef' => 'ABC-123', 'orderNumber' => 'ABC-123', 'currencyCode' => 'USD', 'amount' => 123,