File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed
src/Omnipay/SagePay/Message Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change 162162 // load POST data
163163 $ params = $ app ['request ' ]->get ('params ' );
164164 $ card = $ app ['request ' ]->get ('card ' );
165+ /*
165166 $items = new Omnipay\Common\ItemBag;
166167 $items->add(array(
167168 'id' => 'ABC123',
171172 'tax' => '2.00',
172173 ));
173174/*
175+
174176 $items->add(array(
175177 'id' => 'ZZZ1234',
176178 'name' => 'Food2',
177179 'quantity' => 1,
178180 'price' => '1.00',
179181 'tax' => '1.00',
180182 ));
181- */
183+
182184 $params['tax'] = "2.00";
183185 $params['shipping'] = "1.00";
184-
186+ */
185187 // save POST data into session
186188 $ app ['session ' ]->set ($ sessionVar .'.purchase ' , $ params );
187189 $ app ['session ' ]->set ($ sessionVar .'.card ' , $ card );
188190
189191 $ params ['card ' ] = $ card ;
190192 $ params ['clientIp ' ] = $ app ['request ' ]->getClientIp ();
191193 //$params['lowProfile'] = true;
192- $ params ['items ' ] = $ items ;
194+ // $params['items'] = $items;
193195
194196/*
195197 print_r($params);
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ public function isRedirect()
4040 */
4141 public function getTransactionReference ()
4242 {
43+ /*
4344 if (isset($this->data['SecurityKey']) && isset($this->data['TxAuthNo']) && isset($this->data['VPSTxId'])) {
4445 return json_encode(
4546 array(
@@ -50,6 +51,19 @@ public function getTransactionReference()
5051 )
5152 );
5253 }
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+
5367 }
5468
5569 public function getMessage ()
You can’t perform that action at this time.
0 commit comments