From a72aa663e3ec11daf723eb0770eb82f119a78953 Mon Sep 17 00:00:00 2001 From: Mai Ngo Date: Thu, 29 Aug 2024 00:16:22 -0400 Subject: [PATCH] RGOPS-5685 Modified to support PerformLookup --- config/rgProperties.json | 2 +- lib/gatewayService.js | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/config/rgProperties.json b/config/rgProperties.json index 4d1e65b..43be9b1 100644 --- a/config/rgProperties.json +++ b/config/rgProperties.json @@ -10,7 +10,7 @@ "LIVE_HOST_16": "gateway-16.rocketgate.com", "LIVE_HOST_17": "gateway-17.rocketgate.com", "TEST_HOST": "dev-gateway.rocketgate.com", - "VERSION_NUMBER": "K2.4" + "VERSION_NUMBER": "K2.5" }, "responseSettings": { "VERSION_INDICATOR": "version", diff --git a/lib/gatewayService.js b/lib/gatewayService.js index e7a09fe..5fe4728 100644 --- a/lib/gatewayService.js +++ b/lib/gatewayService.js @@ -594,6 +594,28 @@ function GatewayService(options) { }); } + /** + * Lookup previous transaction + * + * @param {Object} request + * @param {Object} response + * @param {Function} callback + */ + function performLookup(request, response, callback) { + request.transactionType = "LOOKUP"; + var referenceGUID = request.referenceGUID; + + if (referenceGUID) { + performTargetedTransaction(request, response, function(results, request, response) { + callback(results, request, response); + }); + } else { + performTransaction(request, response, function(results, request, response) { + callback(results, request, response); + }); + } + } + /** * Submit purchase information to the RocketGate system for validation and * fraud analysis. @@ -700,6 +722,7 @@ function GatewayService(options) { performPurchase: performPurchase, performCredit: performCredit, performVoid: performVoid, + performLookup: performLookup, performCardScrub: performCardScrub, performRebillCancel: performRebillCancel, performRebillUpdate: performRebillUpdate,