Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation
Rust adyenbeginner-friendlyfeaturedfinancefintechhacktoberfesthigh-performanceopen-sourceorchestrationpaymentpayment-gatewaypayment-integrationpayment-processingpaymentspayments-platformrestful-apirustsdkstripeworks-with-react
ci(test): Fix nmi postman collection (#5928)
Gnanasundari24dccb8d4e629d
diff --git a/postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario10-Add card flow/.meta.json b/postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario10-Add card flow/.meta.jsonindex 5f65896adb..7d5a8078af 100644--- a/postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario10-Add card flow/.meta.json+++ b/postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario10-Add card flow/.meta.json@@ -1,6 +1,7 @@{"childrenOrder": ["Payments - Create",+ "Payments - Retrieve","List payment methods for a Customer","Save card payments - Create","Save card payments - Confirm",diff --git a/postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario10-Add card flow/Payments - Retrieve/event.test.js b/postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario10-Add card flow/Payments - Retrieve/event.test.jsindex d0a02af743..814cc4496d 100644--- a/postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario10-Add card flow/Payments - Retrieve/event.test.js+++ b/postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario10-Add card flow/Payments - Retrieve/event.test.js@@ -6,7 +6,7 @@ pm.test("[GET]::/payments/:id - Status code is 2xx", function () {// Validate if response header has matching content-typepm.test("[GET]::/payments/:id - Content-Type is application/json", function () {pm.expect(pm.response.headers.get("Content-Type")).to.include(- "application/json",+ "application/json");});@@ -26,11 +26,11 @@ if (jsonData?.payment_id) {pm.collectionVariables.set("payment_id", jsonData.payment_id);console.log("- use {{payment_id}} as collection variable for value",- jsonData.payment_id,+ jsonData.payment_id);} else {console.log(- "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.",+ "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.");}@@ -39,11 +39,11 @@ if (jsonData?.mandate_id) {pm.collectionVariables.set("mandate_id", jsonData.mandate_id);console.log("- use {{mandate_id}} as collection variable for value",- jsonData.mandate_id,+ jsonData.mandate_id);} else {console.log(- "INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.",+ "INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.");}@@ -52,10 +52,10 @@ if (jsonData?.client_secret) {pm.collectionVariables.set("client_secret", jsonData.client_secret);console.log("- use {{client_secret}} as collection variable for value",- jsonData.client_secret,+ jsonData.client_secret);} else {console.log(- "INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.",+ "INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.");}diff --git a/postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario10-Add card flow/Payments - Retrieve/request.json b/postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario10-Add card flow/Payments - Retrieve/request.jsonindex c71774083b..6cd4b7d96c 100644--- a/postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario10-Add card flow/Payments - Retrieve/request.json+++ b/postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario10-Add card flow/Payments - Retrieve/request.json@@ -7,13 +7,14 @@}],"url": {- "raw": "{{baseUrl}}/payments/:id",- "host": [- "{{baseUrl}}"- ],- "path": [- "payments",- ":id"+ "raw": "{{baseUrl}}/payments/:id?force_sync=true",+ "host": ["{{baseUrl}}"],+ "path": ["payments", ":id"],+ "query": [+ {+ "key": "force_sync",+ "value": "true"+ }],"variable": [{diff --git a/postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario11-Don't Pass CVV for save card flow and verify success payment/.meta.json b/postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario11-Don't Pass CVV for save card flow and verify success payment/.meta.jsonindex 1ebea8f5e8..9fdf39812c 100644--- a/postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario11-Don't Pass CVV for save card flow and verify success payment/.meta.json+++ b/postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario11-Don't Pass CVV for save card flow and verify success payment/.meta.json@@ -1,8 +1,8 @@{"childrenOrder": ["Payments - Create",+ "Payments - Retrieve","List payment methods for a Customer","Save card payments - Create","Save card payments - Confirm"- ]-}+ ]}diff --git a/postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario11-Don't Pass CVV for save card flow and verify success payment/Payments - Create/event.test.js b/postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario11-Don't Pass CVV for save card flow and verify success payment/Payments - Create/event.test.jsindex cd3e43df90..c2bed81a7b 100644--- a/postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario11-Don't Pass CVV for save card flow and verify success payment/Payments - Create/event.test.js+++ b/postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario11-Don't Pass CVV for save card flow and verify success payment/Payments - Create/event.test.js@@ -1,46 +1,64 @@-// Validate status 2xx+// Validate status 2xxpm.test("[POST]::/payments - Status code is 2xx", function () {- pm.response.to.be.success;+ pm.response.to.be.success;});// Validate if response header has matching content-typepm.test("[POST]::/payments - Content-Type is application/json", function () {- pm.expect(pm.response.headers.get("Content-Type")).to.include("application/json");+ pm.expect(pm.response.headers.get("Content-Type")).to.include(+ "application/json"+ );});-// Validate if response has JSON Body+// Validate if response has JSON Bodypm.test("[POST]::/payments - Response has JSON Body", function () {- pm.response.to.have.jsonBody();+ pm.response.to.have.jsonBody();});// Set response object as internal variablelet jsonData = {};-try {jsonData = pm.response.json();}catch(e){}+try {+ jsonData = pm.response.json();+} catch (e) {}// pm.collectionVariables - Set payment_id as variable for jsonData.payment_idif (jsonData?.payment_id) {- pm.collectionVariables.set("payment_id", jsonData.payment_id);- console.log("- use {{payment_id}} as collection variable for value",jsonData.payment_id);+ pm.collectionVariables.set("payment_id", jsonData.payment_id);+ console.log(+ "- use {{payment_id}} as collection variable for value",+ jsonData.payment_id+ );} else {- console.log('INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined.');-};-+ console.log(+ "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined."+ );+}// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_idif (jsonData?.mandate_id) {- pm.collectionVariables.set("mandate_id", jsonData.mandate_id);- console.log("- use {{mandate_id}} as collection variable for value",jsonData.mandate_id);+ pm.collectionVariables.set("mandate_id", jsonData.mandate_id);+ console.log(+ "- use {{mandate_id}} as collection variable for value",+ jsonData.mandate_id+ );} else {- console.log('INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined.');-};+ console.log(+ "INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined."+ );+}// pm.collectionVariables - Set client_secret as variable for jsonData.client_secretif (jsonData?.client_secret) {- pm.collectionVariables.set("client_secret", jsonData.client_secret);- console.log("- use {{client_secret}} as collection variable for value",jsonData.client_secret);+ pm.collectionVariables.set("client_secret", jsonData.client_secret);+ console.log(+ "- use {{client_secret}} as collection variable for value",+ jsonData.client_secret+ );} else {- console.log('INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined.');-};+ console.log(+ "INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined."+ );+}// Response body should have value "processing" for "status"if (jsonData?.status) {@@ -48,13 +66,18 @@ if (jsonData?.status) {"[POST]::/payments - Content check if value for 'status' matches 'processing'",function () {pm.expect(jsonData.status).to.eql("processing");- },+ });}if (jsonData?.customer_id) {- pm.collectionVariables.set("customer_id", jsonData.customer_id);- console.log("- use {{customer_id}} as collection variable for value",jsonData.customer_id);+ pm.collectionVariables.set("customer_id", jsonData.customer_id);+ console.log(+ "- use {{customer_id}} as collection variable for value",+ jsonData.customer_id+ );} else {- console.log('INFO - Unable to assign variable {{customer_id}}, as jsonData.customer_id is undefined.');-};\ No newline at end of file+ console.log(+ "INFO - Unable to assign variable {{customer_id}}, as jsonData.customer_id is undefined."+ );+}diff --git a/postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario11-Don't Pass CVV for save card flow and verify success payment/Payments - Retrieve/.event.meta.json b/postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario11-Don't Pass CVV for save card flow and verify success payment/Payments - Retrieve/.event.meta.jsonnew file mode 100644index 0000000000..688c85746e--- /dev/null+++ b/postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario11-Don't Pass CVV for save card flow and verify success payment/Payments - Retrieve/.event.meta.json@@ -0,0 +1,5 @@+{+ "eventOrder": [+ "event.test.js"+ ]+}diff --git a/postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario11-Don't Pass CVV for save card flow and verify success payment/Payments - Retrieve/event.test.js b/postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario11-Don't Pass CVV for save card flow and verify success payment/Payments - Retrieve/event.test.jsnew file mode 100644index 0000000000..814cc4496d--- /dev/null+++ b/postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario11-Don't Pass CVV for save card flow and verify success payment/Payments - Retrieve/event.test.js@@ -0,0 +1,61 @@+// Validate status 2xx+pm.test("[GET]::/payments/:id - Status code is 2xx", function () {+ pm.response.to.be.success;+});++// Validate if response header has matching content-type+pm.test("[GET]::/payments/:id - Content-Type is application/json", function () {+ pm.expect(pm.response.headers.get("Content-Type")).to.include(+ "application/json"+ );+});++// Set response object as internal variable+let jsonData = {};+try {+ jsonData = pm.response.json();+} catch (e) {}++// Validate if response has JSON Body+pm.test("[GET]::/payments/:id - Response has JSON Body", function () {+ pm.response.to.have.jsonBody();+});++// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id+if (jsonData?.payment_id) {+ pm.collectionVariables.set("payment_id", jsonData.payment_id);+ console.log(+ "- use {{payment_id}} as collection variable for value",+ jsonData.payment_id+ );+} else {+ console.log(+ "INFO - Unable to assign variable {{payment_id}}, as jsonData.payment_id is undefined."+ );+}++// pm.collectionVariables - Set mandate_id as variable for jsonData.mandate_id+if (jsonData?.mandate_id) {+ pm.collectionVariables.set("mandate_id", jsonData.mandate_id);+ console.log(+ "- use {{mandate_id}} as collection variable for value",+ jsonData.mandate_id+ );+} else {+ console.log(+ "INFO - Unable to assign variable {{mandate_id}}, as jsonData.mandate_id is undefined."+ );+}++// pm.collectionVariables - Set client_secret as variable for jsonData.client_secret+if (jsonData?.client_secret) {+ pm.collectionVariables.set("client_secret", jsonData.client_secret);+ console.log(+ "- use {{client_secret}} as collection variable for value",+ jsonData.client_secret+ );+} else {+ console.log(+ "INFO - Unable to assign variable {{client_secret}}, as jsonData.client_secret is undefined."+ );+}diff --git a/postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario11-Don't Pass CVV for save card flow and verify success payment/Payments - Retrieve/request.json b/postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario11-Don't Pass CVV for save card flow and verify success payment/Payments - Retrieve/request.jsonnew file mode 100644index 0000000000..6cd4b7d96c--- /dev/null+++ b/postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario11-Don't Pass CVV for save card flow and verify success payment/Payments - Retrieve/request.json@@ -0,0 +1,28 @@+{+ "method": "GET",+ "header": [+ {+ "key": "Accept",+ "value": "application/json"+ }+ ],+ "url": {+ "raw": "{{baseUrl}}/payments/:id?force_sync=true",+ "host": ["{{baseUrl}}"],+ "path": ["payments", ":id"],+ "query": [+ {+ "key": "force_sync",+ "value": "true"+ }+ ],+ "variable": [+ {+ "key": "id",+ "value": "{{payment_id}}",+ "description": "(Required) unique payment id"+ }+ ]+ },+ "description": "To retrieve the properties of a Payment. This may be used to get the status of a previously initiated payment or next action for an ongoing payment"+}diff --git a/postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario11-Don't Pass CVV for save card flow and verify success payment/Payments - Retrieve/response.json b/postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario11-Don't Pass CVV for save card flow and verify success payment/Payments - Retrieve/response.jsonnew file mode 100644index 0000000000..fe51488c70--- /dev/null+++ b/postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario11-Don't Pass CVV for save card flow and verify success payment/Payments - Retrieve/response.json@@ -0,0 +1 @@+[]