Skip to content

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

ci(postman): Update status for paypal postman collection (#5929)

likhinbopanna1c827986c308
diff --git a/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario1-Create payment with confirm true/Payments - Create/event.test.js b/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario1-Create payment with confirm true/Payments - Create/event.test.js
index aeb351e4da..1a30711ba0 100644
--- a/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario1-Create payment with confirm true/Payments - Create/event.test.js
+++ b/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario1-Create payment with confirm true/Payments - Create/event.test.js
@@ -60,13 +60,13 @@ if (jsonData?.client_secret) {
);
}
-// Response body should have value "processing" for "status"
+// Response body should have value "succeeded" for "status"
if (jsonData?.status) {
pm.test(
- "[POST]::/payments - Content check if value for 'status' matches 'processing'",
+ "[POST]::/payments - Content check if value for 'status' matches 'succeeded'",
function () {
- pm.expect(jsonData.status).to.eql("processing");
- },
+ pm.expect(jsonData.status).to.eql("succeeded");
+ }
);
}
diff --git a/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario1-Create payment with confirm true/Payments - Retrieve/event.test.js b/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario1-Create payment with confirm true/Payments - Retrieve/event.test.js
index 78121d8fe5..03d30ea4a1 100644
--- a/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario1-Create payment with confirm true/Payments - Retrieve/event.test.js
+++ b/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario1-Create payment with confirm true/Payments - Retrieve/event.test.js
@@ -60,13 +60,13 @@ if (jsonData?.client_secret) {
);
}
-// Response body should have value "processing" for "status"
+// Response body should have value "succeeded" for "status"
if (jsonData?.status) {
pm.test(
- "[POST]::/payments/:id - Content check if value for 'status' matches 'processing'",
+ "[POST]::/payments/:id - Content check if value for 'status' matches 'succeeded'",
function () {
- pm.expect(jsonData.status).to.eql("processing");
- },
+ pm.expect(jsonData.status).to.eql("succeeded");
+ }
);
}
diff --git a/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario11-Create Partial Capture payment/Payments - Capture/event.test.js b/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario11-Create Partial Capture payment/Payments - Capture/event.test.js
index 1fbef27183..5dae93d572 100644
--- a/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario11-Create Partial Capture payment/Payments - Capture/event.test.js
+++ b/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario11-Create Partial Capture payment/Payments - Capture/event.test.js
@@ -8,9 +8,9 @@ pm.test(
"[POST]::/payments/:id/capture - Content-Type is application/json",
function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include(
- "application/json",
+ "application/json"
);
- },
+ }
);
// Validate if response has JSON Body
@@ -29,11 +29,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."
);
}
@@ -42,11 +42,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."
);
}
@@ -55,21 +55,21 @@ 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."
);
}
-// Response body should have value "processing" for "status"
+// Response body should have value "partially_captured" for "status"
if (jsonData?.status) {
pm.test(
- "[POST]:://payments/:id/capture - Content check if value for 'status' matches 'processing'",
+ "[POST]:://payments/:id/capture - Content check if value for 'status' matches 'partially_captured'",
function () {
- pm.expect(jsonData.status).to.eql("processing");
- },
+ pm.expect(jsonData.status).to.eql("partially_captured");
+ }
);
}
@@ -84,7 +84,7 @@ if (jsonData?.amount) {
"[post]:://payments/:id/capture - Content check if value for 'amount' matches '6540'",
function () {
pm.expect(jsonData.amount).to.eql(6540);
- },
+ }
);
}
@@ -94,7 +94,7 @@ if (jsonData?.amount_received) {
"[POST]::/payments:id/capture - Content check if value for 'amount_received' matches '6000'",
function () {
pm.expect(jsonData.amount_received).to.eql(6000);
- },
+ }
);
}
@@ -104,6 +104,6 @@ if (jsonData?.amount_capturable) {
"[post]:://payments/:id/capture - Content check if value for 'amount_capturable' matches 6540",
function () {
pm.expect(jsonData.amount_capturable).to.eql(6540);
- },
+ }
);
}
diff --git a/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario11-Create Partial Capture payment/Payments - Retrieve/event.test.js b/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario11-Create Partial Capture payment/Payments - Retrieve/event.test.js
index 06abc1d37a..0bd9a4f1b2 100644
--- a/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario11-Create Partial Capture payment/Payments - Retrieve/event.test.js
+++ b/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario11-Create Partial Capture payment/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-type
pm.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,21 +52,21 @@ 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."
);
}
-// Response body should have value "processing" for "status"
+// Response body should have value "partially_captured" for "status"
if (jsonData?.status) {
pm.test(
- "[POST]::/payments - Content check if value for 'status' matches 'processing'",
+ "[POST]::/payments - Content check if value for 'status' matches 'partially_captured'",
function () {
- pm.expect(jsonData.status).to.eql("processing");
- },
+ pm.expect(jsonData.status).to.eql("partially_captured");
+ }
);
}
@@ -81,7 +81,7 @@ if (jsonData?.amount) {
"[post]:://payments/:id/capture - Content check if value for 'amount' matches '6540'",
function () {
pm.expect(jsonData.amount).to.eql(6540);
- },
+ }
);
}
@@ -91,7 +91,7 @@ if (jsonData?.amount_received) {
"[POST]::/payments:id/capture - Content check if value for 'amount_received' matches '6000'",
function () {
pm.expect(jsonData.amount_received).to.eql(6000);
- },
+ }
);
}
@@ -101,6 +101,6 @@ if (jsonData?.amount_capturable) {
"[post]:://payments/:id/capture - Content check if value for 'amount_capturable' matches 'amount - 6540'",
function () {
pm.expect(jsonData.amount_capturable).to.eql(6540);
- },
+ }
);
}
diff --git a/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Confirm/event.test.js b/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Confirm/event.test.js
index 615015e3f2..1c6058fbad 100644
--- a/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Confirm/event.test.js
+++ b/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Confirm/event.test.js
@@ -63,13 +63,13 @@ if (jsonData?.client_secret) {
);
}
-// Response body should have value "processing" for "status"
+// Response body should have value "succeeded" for "status"
if (jsonData?.status) {
pm.test(
- "[POST]::/payments/:id/confirm - Content check if value for 'status' matches 'processing'",
+ "[POST]::/payments/:id/confirm - Content check if value for 'status' matches 'succeeded'",
function () {
- pm.expect(jsonData.status).to.eql("processing");
- },
+ pm.expect(jsonData.status).to.eql("succeeded");
+ }
);
}
diff --git a/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Retrieve/event.test.js b/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Retrieve/event.test.js
index 286e0db843..15e0f819b4 100644
--- a/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Retrieve/event.test.js
+++ b/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Retrieve/event.test.js
@@ -60,13 +60,13 @@ if (jsonData?.client_secret) {
);
}
-// Response body should have value "processing" for "status"
+// Response body should have value "succeeded" for "status"
if (jsonData?.status) {
pm.test(
- "[POST]::/payments:id - Content check if value for 'status' matches 'processing'",
+ "[POST]::/payments:id - Content check if value for 'status' matches 'succeeded'",
function () {
- pm.expect(jsonData.status).to.eql("processing");
- },
+ pm.expect(jsonData.status).to.eql("succeeded");
+ }
);
}
diff --git a/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Confirm/event.test.js b/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Confirm/event.test.js
index caeefcaa56..05808ceade 100644
--- a/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Confirm/event.test.js
+++ b/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Confirm/event.test.js
@@ -63,13 +63,13 @@ if (jsonData?.client_secret) {
);
}
-// Response body should have value "processing" for "status"
+// Response body should have value "succeeded" for "status"
if (jsonData?.status) {
pm.test(
- "[POST]::/payments:id/confirm - Content check if value for 'status' matches 'processing'",
+ "[POST]::/payments:id/confirm - Content check if value for 'status' matches 'succeeded'",
function () {
- pm.expect(jsonData.status).to.eql("processing");
- },
+ pm.expect(jsonData.status).to.eql("succeeded");
+ }
);
}
diff --git a/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Retrieve/event.test.js b/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Retrieve/event.test.js
index 286e0db843..15e0f819b4 100644
--- a/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Retrieve/event.test.js
+++ b/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Retrieve/event.test.js
@@ -60,13 +60,13 @@ if (jsonData?.client_secret) {
);
}
-// Response body should have value "processing" for "status"
+// Response body should have value "succeeded" for "status"
if (jsonData?.status) {
pm.test(
- "[POST]::/payments:id - Content check if value for 'status' matches 'processing'",
+ "[POST]::/payments:id - Content check if value for 'status' matches 'succeeded'",
function () {
- pm.expect(jsonData.status).to.eql("processing");
- },
+ pm.expect(jsonData.status).to.eql("succeeded");
+ }
);
}
diff --git a/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture with confirm false/Payments - Capture/event.test.js b/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture with confirm false/Payments - Capture/event.test.js
index 6b58fbb86f..17b8955099 100644
--- a/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture with confirm false/Payments - Capture/event.test.js
+++ b/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture with confirm false/Payments - Capture/event.test.js
@@ -63,13 +63,13 @@ if (jsonData?.client_secret) {
);
}
-// Response body should have value "processing" for "status"
+// Response body should have value "partially_captured" for "status"
if (jsonData?.status) {
pm.test(
- "[POST]:://payments/:id/capture - Content check if value for 'status' matches 'processing'",
+ "[POST]:://payments/:id/capture - Content check if value for 'status' matches 'partially_captured'",
function () {
- pm.expect(jsonData.status).to.eql("processing");
- },
+ pm.expect(jsonData.status).to.eql("partially_captured");
+ }
);
}
diff --git a/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture with confirm false/Payments - Retrieve/event.test.js b/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture with confirm false/Payments - Retrieve/event.test.js
index 06abc1d37a..0bd9a4f1b2 100644
--- a/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture with confirm false/Payments - Retrieve/event.test.js
+++ b/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture with confirm false/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-type
pm.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,21 +52,21 @@ 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."
);
}
-// Response body should have value "processing" for "status"
+// Response body should have value "partially_captured" for "status"
if (jsonData?.status) {
pm.test(
- "[POST]::/payments - Content check if value for 'status' matches 'processing'",
+ "[POST]::/payments - Content check if value for 'status' matches 'partially_captured'",
function () {
- pm.expect(jsonData.status).to.eql("processing");
- },
+ pm.expect(jsonData.status).to.eql("partially_captured");
+ }
);
}
@@ -81,7 +81,7 @@ if (jsonData?.amount) {
"[post]:://payments/:id/capture - Content check if value for 'amount' matches '6540'",
function () {
pm.expect(jsonData.amount).to.eql(6540);
- },
+ }
);
}
@@ -91,7 +91,7 @@ if (jsonData?.amount_received) {
"[POST]::/payments:id/capture - Content check if value for 'amount_received' matches '6000'",
function () {
pm.expect(jsonData.amount_received).to.eql(6000);
- },
+ }
);
}
@@ -101,6 +101,6 @@ if (jsonData?.amount_capturable) {
"[post]:://payments/:id/capture - Content check if value for 'amount_capturable' matches 'amount - 6540'",
function () {
pm.expect(jsonData.amount_capturable).to.eql(6540);
- },
+ }
);
}
diff --git a/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Capture/event.test.js b/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Capture/event.test.js
index 572f74e6d5..8d98f8b9c8 100644
--- a/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Capture/event.test.js
+++ b/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Capture/event.test.js
@@ -8,9 +8,9 @@ pm.test(
"[POST]::/payments/:id/capture - Content-Type is application/json",
function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include(
- "application/json",
+ "application/json"
);
- },
+ }
);
// Validate if response has JSON Body
@@ -29,11 +29,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."
);
}
@@ -42,11 +42,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."
);
}
@@ -55,21 +55,21 @@ 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."
);
}
-// Response body should have value "processing" for "status"
+// Response body should have value "succeeded" for "status"
if (jsonData?.status) {
pm.test(
- "[POST]:://payments/:id/capture - Content check if value for 'status' matches 'processing'",
+ "[POST]:://payments/:id/capture - Content check if value for 'status' matches 'succeeded'",
function () {
- pm.expect(jsonData.status).to.eql("processing");
- },
+ pm.expect(jsonData.status).to.eql("succeeded");
+ }
);
}
@@ -84,17 +84,17 @@ if (jsonData?.amount) {
"[post]:://payments/:id/capture - Content check if value for 'amount' matches '6540'",
function () {
pm.expect(jsonData.amount).to.eql(6540);
- },
+ }
);
}
-// Response body should have value "6000" for "amount_received"
+// Response body should have value "6540" for "amount_received"
if (jsonData?.amount_received) {
pm.test(
- "[POST]::/payments:id/capture - Content check if value for 'amount_received' matches '6000'",
+ "[POST]::/payments:id/capture - Content check if value for 'amount_received' matches '6540'",
function () {
pm.expect(jsonData.amount_received).to.eql(6540);
- },
+ }
);
}
@@ -104,16 +104,7 @@ if (jsonData?.amount_capturable) {
"[post]:://payments/:id/capture - Content check if value for 'amount_capturable' matches 6540",
function () {
pm.expect(jsonData.amount_capturable).to.eql(6540);
- },
+ }
);
}
-// Response body should have value "0" for "amount_received"
-if (jsonData?.amount_received) {
- pm.test(
- "[post]:://payments/:id/capture - Content check if value for 'amount_received' matches 0",
- function () {
- pm.expect(jsonData.amount_received).to.eql(0);
- },
- );
-}
diff --git a/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Retrieve/event.test.js b/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Retrieve/event.test.js
index 021d1f1475..3a6ef4049b 100644
--- a/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Retrieve/event.test.js
+++ b/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/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-type
pm.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,21 +52,21 @@ 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."
);
}
-// Response body should have value "processing" for "status"
+// Response body should have value "succeeded" for "status"
if (jsonData?.status) {
pm.test(
- "[POST]::/payments - Content check if value for 'status' matches 'processing'",
+ "[POST]::/payments - Content check if value for 'status' matches 'succeeded'",
function () {
- pm.expect(jsonData.status).to.eql("processing");
- },
+ pm.expect(jsonData.status).to.eql("succeeded");
+ }
);
}
@@ -81,7 +81,7 @@ if (jsonData?.amount) {
"[post]:://payments/:id/capture - Content check if value for 'amount' matches '6540'",
function () {
pm.expect(jsonData.amount).to.eql(6540);
- },
+ }
);
}
@@ -91,7 +91,7 @@ if (jsonData?.amount_received) {
"[POST]::/payments:id/capture - Content check if value for 'amount_received' matches '6000'",
function () {
pm.expect(jsonData.amount_received).to.eql(6540);
- },
+ }
);
}
@@ -101,6 +101,6 @@ if (jsonData?.amount_capturable) {
"[post]:://payments/:id/capture - Content check if value for 'amount_capturable' matches 'amount - 6540'",
function () {
pm.expect(jsonData.amount_capturable).to.eql(6540);
- },
+ }
);
}
diff --git a/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario8-Create payment with Manual capture with confirm false and surcharge_data/Payments - Capture/event.test.js b/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario8-Create payment with Manual capture with confirm false and surcharge_data/Payments - Capture/event.test.js
index b09744cff1..738f50438b 100644
--- a/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario8-Create payment with Manual capture with confirm false and surcharge_data/Payments - Capture/event.test.js
+++ b/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario8-Create payment with Manual capture with confirm false and surcharge_data/Payments - Capture/event.test.js
@@ -8,9 +8,9 @@ pm.test(
"[POST]::/payments/:id/capture - Content-Type is application/json",
function () {
pm.expect(pm.response.headers.get("Content-Type")).to.include(
- "application/json",
+ "application/json"
);
- },
+ }
);
// Validate if response has JSON Body
@@ -29,11 +29,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."
);
}
@@ -42,11 +42,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."
);
}
@@ -55,21 +55,21 @@ 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."
);
}
-// Response body should have value "processing" for "status"
+// Response body should have value "partially_captured" for "status"
if (jsonData?.status) {
pm.test(
- "[POST]:://payments/:id/capture - Content check if value for 'status' matches 'processing'",
+ "[POST]:://payments/:id/capture - Content check if value for 'status' matches 'partially_captured'",
function () {
- pm.expect(jsonData.status).to.eql("processing");
- },
+ pm.expect(jsonData.status).to.eql("partially_captured");
+ }
);
}
@@ -84,7 +84,7 @@ if (jsonData?.amount) {
"[post]:://payments/:id/capture - Content check if value for 'amount' matches '6540'",
function () {
pm.expect(jsonData.amount).to.eql(6540);
- },
+ }
);
}
@@ -94,7 +94,7 @@ if (jsonData?.amount_received) {
"[POST]::/payments:id/capture - Content check if value for 'amount_received' matches '6000'",
function () {
pm.expect(jsonData.amount_received).to.eql(6000);
- },
+ }
);
}
@@ -104,13 +104,16 @@ if (jsonData?.amount_capturable) {
"[post]:://payments/:id/capture - Content check if value for 'amount_capturable' matches 6550",
function () {
pm.expect(jsonData.amount_capturable).to.eql(6550);
- },
+ }
);
}
// Response body should have a valid surcharge_details field"
-pm.test("Check if valid 'surcharge_details' is present in the response", function () {
- pm.response.to.have.jsonBody('surcharge_details');
- pm.expect(jsonData.surcharge_details.surcharge_amount).to.eql(5);
- pm.expect(jsonData.surcharge_details.tax_amount).to.eql(5);
-});
+pm.test(
+ "Check if valid 'surcharge_details' is present in the response",
+ function () {
+ pm.response.to.have.jsonBody("surcharge_details");
+ pm.expect(jsonData.surcharge_details.surcharge_amount).to.eql(5);
+ pm.expect(jsonData.surcharge_details.tax_amount).to.eql(5);
+ }
+);
diff --git a/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario8-Create payment with Manual capture with confirm false and surcharge_data/Payments - Retrieve/event.test.js b/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario8-Create payment with Manual capture with confirm false and surcharge_data/Payments - Retrieve/event.test.js
index 69fd556346..86e0844b6d 100644
--- a/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario8-Create payment with Manual capture with confirm false and surcharge_data/Payments - Retrieve/event.test.js
+++ b/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario8-Create payment with Manual capture with confirm false and surcharge_data/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-type
pm.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,21 +52,21 @@ 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."
);
}
-// Response body should have value "processing" for "status"
+// Response body should have value "partially_captured" for "status"
if (jsonData?.status) {
pm.test(
- "[POST]::/payments - Content check if value for 'status' matches 'processing'",
+ "[POST]::/payments - Content check if value for 'status' matches 'partially_captured'",
function () {
- pm.expect(jsonData.status).to.eql("processing");
- },
+ pm.expect(jsonData.status).to.eql("partially_captured");
+ }
);
}
@@ -81,7 +81,7 @@ if (jsonData?.amount) {
"[post]:://payments/:id/capture - Content check if value for 'amount' matches '6540'",
function () {
pm.expect(jsonData.amount).to.eql(6540);
- },
+ }
);
}
@@ -91,7 +91,7 @@ if (jsonData?.amount_received) {
"[POST]::/payments:id/capture - Content check if value for 'amount_received' matches '6000'",
function () {
pm.expect(jsonData.amount_received).to.eql(6000);
- },
+ }
);
}
@@ -101,13 +101,16 @@ if (jsonData?.amount_capturable) {
"[post]:://payments/:id/capture - Content check if value for 'amount_capturable' matches 'amount - 6550'",
function () {
pm.expect(jsonData.amount_capturable).to.eql(6550);
- },
+ }
);
}
// Response body should have a valid surcharge_details field"
-pm.test("Check if valid 'surcharge_details' is present in the response", function () {
- pm.response.to.have.jsonBody('surcharge_details');
- pm.expect(jsonData.surcharge_details.surcharge_amount).to.eql(5);
- pm.expect(jsonData.surcharge_details.tax_amount).to.eql(5);
-});
+pm.test(
+ "Check if valid 'surcharge_details' is present in the response",
+ function () {
+ pm.response.to.have.jsonBody("surcharge_details");
+ pm.expect(jsonData.surcharge_details.surcharge_amount).to.eql(5);
+ pm.expect(jsonData.surcharge_details.tax_amount).to.eql(5);
+ }
+);
diff --git a/postman/collection-dir/paypal/Flow Testcases/Variation Cases/Scenario4-Capture the succeeded payment/Payments - Create/event.test.js b/postman/collection-dir/paypal/Flow Testcases/Variation Cases/Scenario4-Capture the succeeded payment/Payments - Create/event.test.js
index 16c37817f0..d8aaaa5b2e 100644
--- a/postman/collection-dir/paypal/Flow Testcases/Variation Cases/Scenario4-Capture the succeeded payment/Payments - Create/event.test.js
+++ b/postman/collection-dir/paypal/Flow Testcases/Variation Cases/Scenario4-Capture the succeeded payment/Payments - Create/event.test.js
@@ -60,12 +60,12 @@ if (jsonData?.client_secret) {
);
}
-// Response body should have value "processing" for "status"
+// Response body should have value "succeeded" for "status"
if (jsonData?.status) {
pm.test(
- "[POST]::/payments - Content check if value for 'status' matches 'processing'",
+ "[POST]::/payments - Content check if value for 'status' matches 'succeeded'",
function () {
- pm.expect(jsonData.status).to.eql("processing");
- },
+ pm.expect(jsonData.status).to.eql("succeeded");
+ }
);
}
diff --git a/postman/collection-dir/paypal/Flow Testcases/Variation Cases/Scenario5-Void the success_slash_failure payment/Payments - Create/event.test.js b/postman/collection-dir/paypal/Flow Testcases/Variation Cases/Scenario5-Void the success_slash_failure payment/Payments - Create/event.test.js
index 16c37817f0..e019fcd3c2 100644
--- a/postman/collection-dir/paypal/Flow Testcases/Variation Cases/Scenario5-Void the success_slash_failure payment/Payments - Create/event.test.js
+++ b/postman/collection-dir/paypal/Flow Testcases/Variation Cases/Scenario5-Void the success_slash_failure payment/Payments - Create/event.test.js
@@ -6,7 +6,7 @@ pm.test("[POST]::/payments - Status code is 2xx", function () {
// Validate if response header has matching content-type
pm.test("[POST]::/payments - 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,20 +52,20 @@ 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."
);
}
-// Response body should have value "processing" for "status"
+// Response body should have value "succeeded" for "status"
if (jsonData?.status) {
pm.test(
- "[POST]::/payments - Content check if value for 'status' matches 'processing'",
+ "[POST]::/payments - Content check if value for 'status' matches 'succeeded'",
function () {
- pm.expect(jsonData.status).to.eql("processing");
- },
+ pm.expect(jsonData.status).to.eql("succeeded");
+ }
);
}