Skip to content

Commit

Permalink
Add description to AIM request and update related tests
Browse files Browse the repository at this point in the history
  • Loading branch information
balexander committed Oct 21, 2016
1 parent 4cef58d commit 564da01
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/Message/AIMAbstractRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ protected function addBillingData(\SimpleXMLElement $data)
$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
Expand Down
6 changes: 5 additions & 1 deletion tests/AIMGatewayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
);
}

Expand Down
1 change: 1 addition & 0 deletions tests/Message/AIMAuthorizeRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public function testGetData()
"amount",
"payment",
"customer",
"order",
"billTo",
"shipTo",
"customerIP",
Expand Down

0 comments on commit 564da01

Please sign in to comment.