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 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); 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' ); } 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",