Skip to content

Commit ab87626

Browse files
committed
Merge pull request thephpleague#144 from aderuwe/patch-10
Add forgotten purchase parameter to MultiSafepay gateway
2 parents 3aef8e5 + af3d89d commit ab87626

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/Omnipay/MultiSafepay/Message/PurchaseRequest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,16 @@ public function setExtraData3($value)
8686
return $this->setParameter('extraData3', $value);
8787
}
8888

89+
public function getItems()
90+
{
91+
return $this->getParameter('items');
92+
}
93+
94+
public function setItems($value)
95+
{
96+
return $this->setParameter('items', $value);
97+
}
98+
8999
/**
90100
* {@inheritdoc}
91101
*/
@@ -135,6 +145,7 @@ public function getData()
135145
$transaction->addChild('var1', $this->getExtraData1());
136146
$transaction->addChild('var2', $this->getExtraData2());
137147
$transaction->addChild('var3', $this->getExtraData3());
148+
$transaction->addChild('items', $this->getItems());
138149

139150
$data->addChild('signature', $this->generateSignature());
140151

tests/Omnipay/MultiSafepay/Message/PurchaseRequestTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ protected function setUp()
4141
'extraData2' => 'extra 2',
4242
'extraData3' => 'extra 3',
4343
'language' => 'a language',
44+
'items' => 'the items',
4445
'clientIp' => '127.0.0.1',
4546
'googleAnalyticsCode' => 'analytics code',
4647
'card' => array(
@@ -177,6 +178,7 @@ public function allDataProvider()
177178
<var1>extra 1</var1>
178179
<var2>extra 2</var2>
179180
<var3>extra 3</var3>
181+
<items>the items</items>
180182
</transaction>
181183
<signature>ad447bab87b8597853432c891e341db1</signature>
182184
</redirecttransaction>
@@ -224,6 +226,7 @@ public function noIssuerDataProvider()
224226
<var1>extra 1</var1>
225227
<var2>extra 2</var2>
226228
<var3>extra 3</var3>
229+
<items>the items</items>
227230
</transaction>
228231
<signature>ad447bab87b8597853432c891e341db1</signature>
229232
</redirecttransaction>
@@ -274,6 +277,7 @@ public function specialCharsDataProvider()
274277
<var1>extra 1</var1>
275278
<var2>extra 2</var2>
276279
<var3>extra 3</var3>
280+
<items>the items</items>
277281
</transaction>
278282
<signature>ad447bab87b8597853432c891e341db1</signature>
279283
</redirecttransaction>

0 commit comments

Comments
 (0)