File tree 2 files changed +19
-3
lines changed
src/Omnipay/SagePay/Message
2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change 162
162
// load POST data
163
163
$ params = $ app ['request ' ]->get ('params ' );
164
164
$ card = $ app ['request ' ]->get ('card ' );
165
+ /*
165
166
$items = new Omnipay\Common\ItemBag;
166
167
$items->add(array(
167
168
'id' => 'ABC123',
171
172
'tax' => '2.00',
172
173
));
173
174
/*
175
+
174
176
$items->add(array(
175
177
'id' => 'ZZZ1234',
176
178
'name' => 'Food2',
177
179
'quantity' => 1,
178
180
'price' => '1.00',
179
181
'tax' => '1.00',
180
182
));
181
- */
183
+
182
184
$params['tax'] = "2.00";
183
185
$params['shipping'] = "1.00";
184
-
186
+ */
185
187
// save POST data into session
186
188
$ app ['session ' ]->set ($ sessionVar .'.purchase ' , $ params );
187
189
$ app ['session ' ]->set ($ sessionVar .'.card ' , $ card );
188
190
189
191
$ params ['card ' ] = $ card ;
190
192
$ params ['clientIp ' ] = $ app ['request ' ]->getClientIp ();
191
193
//$params['lowProfile'] = true;
192
- $ params ['items ' ] = $ items ;
194
+ // $params['items'] = $items;
193
195
194
196
/*
195
197
print_r($params);
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ public function isRedirect()
40
40
*/
41
41
public function getTransactionReference ()
42
42
{
43
+ /*
43
44
if (isset($this->data['SecurityKey']) && isset($this->data['TxAuthNo']) && isset($this->data['VPSTxId'])) {
44
45
return json_encode(
45
46
array(
@@ -50,6 +51,19 @@ public function getTransactionReference()
50
51
)
51
52
);
52
53
}
54
+ */
55
+
56
+ if (isset ($ this ->data ['SecurityKey ' ]) && isset ($ this ->data ['VPSTxId ' ])) {
57
+ return json_encode (
58
+ array (
59
+ 'SecurityKey ' => $ this ->data ['SecurityKey ' ],
60
+ //'TxAuthNo' => $this->data['TxAuthNo'],
61
+ 'VPSTxId ' => $ this ->data ['VPSTxId ' ],
62
+ 'VendorTxCode ' => $ this ->getRequest ()->getTransactionId (),
63
+ )
64
+ );
65
+ }
66
+
53
67
}
54
68
55
69
public function getMessage ()
You can’t perform that action at this time.
0 commit comments