File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -150,6 +150,16 @@ public function getCardReference($serialize = true)
150
150
return $ value ;
151
151
}
152
152
153
+ public function getInvoiceNumber ()
154
+ {
155
+ return $ this ->getParameter ('invoiceNumber ' );
156
+ }
157
+
158
+ public function setInvoiceNumber ($ value )
159
+ {
160
+ return $ this ->setParameter ('invoiceNumber ' , $ value );
161
+ }
162
+
153
163
public function sendData ($ data )
154
164
{
155
165
$ headers = array ('Content-Type ' => 'text/xml; charset=utf-8 ' );
@@ -213,13 +223,17 @@ protected function addBillingData(\SimpleXMLElement $data)
213
223
/** @var mixed $req */
214
224
$ req = $ data ->transactionRequest ;
215
225
226
+ // The order must come before the customer ID.
227
+ $ req ->order ->invoiceNumber = $ this ->getInvoiceNumber ();
228
+ $ req ->order ->description = $ this ->getDescription ();
229
+
216
230
// Merchant assigned customer ID
217
231
$ customer = $ this ->getCustomerId ();
218
232
if (!empty ($ customer )) {
219
233
$ req ->customer ->id = $ customer ;
220
234
}
221
235
222
- $ req ->order ->description = $ this ->getDescription ();
236
+ // $req->order->description = $this->getDescription();
223
237
224
238
/** @var CreditCard $card */
225
239
if ($ card = $ this ->getCard ()) {
You can’t perform that action at this time.
0 commit comments