From 963e63a0eb697ee3518513efa1f7359dbd8f9752 Mon Sep 17 00:00:00 2001 From: bd86 Date: Wed, 29 Jun 2016 09:05:58 -0400 Subject: [PATCH 1/4] adds the set description to xml --- src/Message/AIMAbstractRequest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Message/AIMAbstractRequest.php b/src/Message/AIMAbstractRequest.php index 207502bf..7606b20f 100644 --- a/src/Message/AIMAbstractRequest.php +++ b/src/Message/AIMAbstractRequest.php @@ -209,7 +209,9 @@ protected function addBillingData(\SimpleXMLElement $data) if (!empty($customer)) { $req->customer->id = $customer; } - + + $req->order->description = $this->getDescription(); + /** @var CreditCard $card */ if ($card = $this->getCard()) { // A card is present, so include billing and shipping details From 7b333e663b5078c6161415ca515593386ddd3a0d Mon Sep 17 00:00:00 2001 From: bd86 Date: Wed, 29 Jun 2016 09:09:58 -0400 Subject: [PATCH 2/4] added description option to test transactions --- tests/AIMGatewayTest.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/AIMGatewayTest.php b/tests/AIMGatewayTest.php index 81a51537..2aff9546 100644 --- a/tests/AIMGatewayTest.php +++ b/tests/AIMGatewayTest.php @@ -22,21 +22,25 @@ public function setUp() $this->purchaseOptions = array( 'amount' => '10.00', 'card' => $this->getValidCard(), + 'description' => 'purchase' ); $this->captureOptions = array( 'amount' => '10.00', 'transactionReference' => '12345', + 'description' => 'capture' ); $this->voidOptions = array( 'transactionReference' => '12345', + 'description' => 'void' ); $this->refundOptions = array( 'amount' => '10.00', 'transactionReference' => '12345', - 'card' => $this->getValidCard() + 'card' => $this->getValidCard(), + 'description' => 'refund' ); } From bd0bd91bc10ceb961ce3c58308d55d6017419b81 Mon Sep 17 00:00:00 2001 From: bd86 Date: Wed, 29 Jun 2016 09:32:32 -0400 Subject: [PATCH 3/4] added description to keys array --- tests/Message/AIMAuthorizeRequestTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/Message/AIMAuthorizeRequestTest.php b/tests/Message/AIMAuthorizeRequestTest.php index 245d7098..79ddb624 100644 --- a/tests/Message/AIMAuthorizeRequestTest.php +++ b/tests/Message/AIMAuthorizeRequestTest.php @@ -39,6 +39,7 @@ public function testGetData() $keys = array( "transactionType", "amount", + "description", "payment", "customer", "billTo", From c41f0565e7eaf9c37c9bb8868cce66238d9d2dec Mon Sep 17 00:00:00 2001 From: bd86 Date: Wed, 29 Jun 2016 10:21:29 -0400 Subject: [PATCH 4/4] set description --- src/Message/AIMAuthorizeRequest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Message/AIMAuthorizeRequest.php b/src/Message/AIMAuthorizeRequest.php index 21cb991a..c6029867 100644 --- a/src/Message/AIMAuthorizeRequest.php +++ b/src/Message/AIMAuthorizeRequest.php @@ -16,6 +16,7 @@ public function getData() $this->validate('amount'); $data = $this->getBaseData(); $data->transactionRequest->amount = $this->getAmount(); + $this->setDescription($data); $this->addPayment($data); $this->addBillingData($data); $this->addCustomerIP($data);