diff --git a/lib/AuthorizeNetGateway.js b/lib/AuthorizeNetGateway.js index 4cb9a50..fa446ba 100644 --- a/lib/AuthorizeNetGateway.js +++ b/lib/AuthorizeNetGateway.js @@ -139,6 +139,12 @@ AuthorizeNetGateway.prototype.submitTransaction = function submitTransaction (or } }; + if(order.invoiceNumber !== undefined) { + body.order = { + invoiceNumber: order.invoiceNumber + } + } + if (prospect) { body.billTo = mapKeys(prospect, billToSchema); body.shipTo = mapKeys(prospect, shipToSchema); @@ -176,6 +182,12 @@ AuthorizeNetGateway.prototype.authorizeTransaction = function authorizeTransacti } }; + if(order.invoiceNumber !== undefined) { + body.order = { + invoiceNumber: order.invoiceNumber + } + } + if (prospect) { body.billTo = mapKeys(prospect, billToSchema); body.shipTo = mapKeys(prospect, shipToSchema);