From fc074c20173c567fb6c815919ebee9c535f5a701 Mon Sep 17 00:00:00 2001 From: Kyle Cannon Date: Wed, 24 Feb 2016 10:15:12 -0800 Subject: [PATCH] Add order invoice property to submitTransaction and authorizeTransaction --- lib/AuthorizeNetGateway.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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);