Skip to content

Commit a508b56

Browse files
authored
Merge pull request #87 from hillelcoren/master
Add `solutionId` support.
2 parents b36d3c1 + 906d5d2 commit a508b56

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

src/Message/AIMAbstractRequest.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,16 @@ public function getEndpoint()
100100
return $this->getDeveloperMode() ? $this->getDeveloperEndpoint() : $this->getLiveEndpoint();
101101
}
102102

103+
public function getSolutionId()
104+
{
105+
return $this->getParameter('solutionId');
106+
}
107+
108+
public function setSolutionId($value)
109+
{
110+
return $this->setParameter('solutionId', $value);
111+
}
112+
103113
/**
104114
* @return TransactionReference
105115
*/
@@ -249,6 +259,15 @@ protected function addTransactionType(\SimpleXMLElement $data)
249259
$data->transactionRequest->transactionType = $this->action;
250260
}
251261

262+
protected function addSolutionId(\SimpleXMLElement $data)
263+
{
264+
$solutionId = $this->getSolutionId();
265+
266+
if (!empty($solutionId)) {
267+
$data->transactionRequest->solution->id = $solutionId;
268+
}
269+
}
270+
252271
/**
253272
* Adds billing data to a partially filled request data object.
254273
*

src/Message/AIMAuthorizeRequest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public function getData()
1717
$data = $this->getBaseData();
1818
$data->transactionRequest->amount = $this->getAmount();
1919
$this->addPayment($data);
20+
$this->addSolutionId($data);
2021
$this->addBillingData($data);
2122
$this->addCustomerIP($data);
2223
$this->addTransactionSettings($data);

0 commit comments

Comments
 (0)