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(Postman): Add refund scenarios for partially captured payment (#3083)
Gnanasundari24f87d1f33a8e4
diff --git a/postman/collection-dir/adyen_uk/Flow Testcases/QuickStart/Payment Connector - Create/request.json b/postman/collection-dir/adyen_uk/Flow Testcases/QuickStart/Payment Connector - Create/request.jsonindex fe25f6f5e6..375c1f0df5 100644--- a/postman/collection-dir/adyen_uk/Flow Testcases/QuickStart/Payment Connector - Create/request.json+++ b/postman/collection-dir/adyen_uk/Flow Testcases/QuickStart/Payment Connector - Create/request.json@@ -56,7 +56,12 @@"payment_method_types": [{"payment_method_type": "credit",- "card_networks": ["Visa", "Mastercard"],+ "card_networks": ["AmericanExpress",+ "Discover",+ "Interac",+ "JCB",+ "Mastercard",+ "Visa", "DinersClub","UnionPay","RuPay"],"minimum_amount": 1,"maximum_amount": 68607706,"recurring_enabled": true,@@ -64,7 +69,12 @@},{"payment_method_type": "debit",- "card_networks": ["Visa", "Mastercard"],+ "card_networks": ["AmericanExpress",+ "Discover",+ "Interac",+ "JCB",+ "Mastercard",+ "Visa", "DinersClub","UnionPay","RuPay"],"minimum_amount": 1,"maximum_amount": 68607706,"recurring_enabled": true,diff --git a/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/.meta.json b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/.meta.jsonnew file mode 100644index 0000000000..6626732a3c--- /dev/null+++ b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/.meta.json@@ -0,0 +1,12 @@+{+ "childrenOrder": [+ "Payments - Create",+ "Payments - Capture",+ "Payments - Retrieve",+ "Refunds - Create",+ "Refunds - Create-copy",+ "Refunds - Retrieve Copy",+ "Refunds - Validation should throw",+ "Payments - Retrieve Copy"+ ]+}diff --git a/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Capture/.event.meta.json b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Capture/.event.meta.jsonnew file mode 100644index 0000000000..688c85746e--- /dev/null+++ b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Capture/.event.meta.json@@ -0,0 +1,5 @@+{+ "eventOrder": [+ "event.test.js"+ ]+}diff --git a/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Capture/event.test.js b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Capture/event.test.jsnew file mode 100644index 0000000000..96d9878078--- /dev/null+++ b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Capture/event.test.js@@ -0,0 +1,105 @@+// Validate status 2xx+pm.test("[POST]::/payments/:id/capture - Status code is 2xx", function () {+ pm.response.to.be.success;+});++// Validate if response header has matching content-type+pm.test(+ "[POST]::/payments/:id/capture - Content-Type is application/json",+ function () {+ pm.expect(pm.response.headers.get("Content-Type")).to.include(+ "application/json",+ );+ },+);++// Validate if response has JSON Body+pm.test("[POST]::/payments/:id/capture - Response has JSON Body", function () {+ pm.response.to.have.jsonBody();+});++// Set response object as internal variable+let jsonData = {};+try {+ jsonData = pm.response.json();+} catch (e) {}++// 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.",+ );+}++// 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 'partially_captured'",+ function () {+ pm.expect(jsonData.status).to.eql("partially_captured");+ },+ );+}++// Response body should have value "6540" for "amount"+if (jsonData?.amount) {+ pm.test(+ "[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"+if (jsonData?.amount_received) {+ pm.test(+ "[POST]::/payments:id/capture - Content check if value for 'amount_received' matches '6000'",+ function () {+ pm.expect(jsonData.amount_received).to.eql(6000);+ },+ );+}++// Response body should have value "0" for "amount_received"+if (jsonData?.amount_capturable) {+ pm.test(+ "[POST]::/payments:id/capture - Content check if value for 'amount_capturable' matches '0'",+ function () {+ pm.expect(jsonData.amount_capturable).to.eql(0);+ },+ );+}+diff --git a/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Capture/request.json b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Capture/request.jsonnew file mode 100644index 0000000000..8975575ca4--- /dev/null+++ b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Capture/request.json@@ -0,0 +1,45 @@+{+ "method": "POST",+ "header": [+ {+ "key": "Content-Type",+ "value": "application/json"+ },+ {+ "key": "Accept",+ "value": "application/json"+ }+ ],+ "body": {+ "mode": "raw",+ "options": {+ "raw": {+ "language": "json"+ }+ },+ "raw_json_formatted": {+ "amount_to_capture": 6000,+ "statement_descriptor_name": "Joseph",+ "statement_descriptor_suffix": "JS"+ }+ },+ "url": {+ "raw": "{{baseUrl}}/payments/:id/capture",+ "host": [+ "{{baseUrl}}"+ ],+ "path": [+ "payments",+ ":id",+ "capture"+ ],+ "variable": [+ {+ "key": "id",+ "value": "{{payment_id}}",+ "description": "(Required) unique payment id"+ }+ ]+ },+ "description": "To capture the funds for an uncaptured payment"+}diff --git a/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Capture/response.json b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Capture/response.jsonnew file mode 100644index 0000000000..fe51488c70--- /dev/null+++ b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Capture/response.json@@ -0,0 +1 @@+[]diff --git a/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Create/.event.meta.json b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Create/.event.meta.jsonnew file mode 100644index 0000000000..688c85746e--- /dev/null+++ b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Create/.event.meta.json@@ -0,0 +1,5 @@+{+ "eventOrder": [+ "event.test.js"+ ]+}diff --git a/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Create/event.test.js b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Create/event.test.jsnew file mode 100644index 0000000000..d683186aa0--- /dev/null+++ b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Create/event.test.js@@ -0,0 +1,71 @@+// Validate status 2xx+pm.test("[POST]::/payments - Status code is 2xx", function () {+ pm.response.to.be.success;+});++// 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",+ );+});++// Validate if response has JSON Body+pm.test("[POST]::/payments - Response has JSON Body", function () {+ pm.response.to.have.jsonBody();+});++// Set response object as internal variable+let jsonData = {};+try {+ jsonData = pm.response.json();+} catch (e) {}++// 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.",+ );+}++// Response body should have value "requires_capture" for "status"+if (jsonData?.status) {+ pm.test(+ "[POST]::/payments - Content check if value for 'status' matches 'requires_capture'",+ function () {+ pm.expect(jsonData.status).to.eql("requires_capture");+ },+ );+}diff --git a/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Create/request.json b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Create/request.jsonnew file mode 100644index 0000000000..4cbb79aa56--- /dev/null+++ b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Create/request.json@@ -0,0 +1,94 @@+{+ "method": "POST",+ "header": [+ {+ "key": "Content-Type",+ "value": "application/json"+ },+ {+ "key": "Accept",+ "value": "application/json"+ }+ ],+ "body": {+ "mode": "raw",+ "options": {+ "raw": {+ "language": "json"+ }+ },+ "raw_json_formatted": {+ "amount": 6540,+ "currency": "USD",+ "confirm": true,+ "capture_method": "manual",+ "capture_on": "2022-09-10T10:11:12Z",+ "amount_to_capture": 6540,+ "customer_id": "StripeCustomer",+ "email": "[email protected]",+ "name": "John Doe",+ "phone": "999999999",+ "phone_country_code": "+65",+ "description": "Its my first payment request",+ "authentication_type": "no_three_ds",+ "return_url": "https://duck.com",+ "payment_method": "card",+ "payment_method_data": {+ "card": {+ "card_number": "4242424242424242",+ "card_exp_month": "10",+ "card_exp_year": "25",+ "card_holder_name": "joseph Doe",+ "card_cvc": "123"+ }+ },+ "billing": {+ "address": {+ "line1": "1467",+ "line2": "Harrison Street",+ "line3": "Harrison Street",+ "city": "San Fransico",+ "state": "California",+ "zip": "94122",+ "country": "US",+ "first_name": "sundari",+ "last_name": "sundari"+ }+ },+ "shipping": {+ "address": {+ "line1": "1467",+ "line2": "Harrison Street",+ "line3": "Harrison Street",+ "city": "San Fransico",+ "state": "California",+ "zip": "94122",+ "country": "US",+ "first_name": "sundari",+ "last_name": "sundari"+ }+ },+ "statement_descriptor_name": "joseph",+ "statement_descriptor_suffix": "JS",+ "metadata": {+ "udf1": "value1",+ "new_customer": "true",+ "login_date": "2019-09-10T10:11:12Z"+ },+ "routing": {+ "type": "single",+ "data": "stripe"+ }+ }+ },+ "url": {+ "raw": "{{baseUrl}}/payments",+ "host": [+ "{{baseUrl}}"+ ],+ "path": [+ "payments"+ ]+ },+ "description": "To process a payment you will have to create a payment, attach a payment method and confirm. Depending on the user journey you wish to achieve, you may opt to all the steps in a single request or in a sequence of API request using following APIs: (i) Payments - Update, (ii) Payments - Confirm, and (iii) Payments - Capture"+}diff --git a/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Create/response.json b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Create/response.jsonnew file mode 100644index 0000000000..fe51488c70--- /dev/null+++ b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Create/response.json@@ -0,0 +1 @@+[]diff --git a/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve Copy/.event.meta.json b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve Copy/.event.meta.jsonnew file mode 100644index 0000000000..688c85746e--- /dev/null+++ b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve Copy/.event.meta.json@@ -0,0 +1,5 @@+{+ "eventOrder": [+ "event.test.js"+ ]+}diff --git a/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve Copy/event.test.js b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve Copy/event.test.jsnew file mode 100644index 0000000000..3342e5b253--- /dev/null+++ b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve Copy/event.test.js@@ -0,0 +1,85 @@+// 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",+ );+});++// Validate if response has JSON Body+pm.test("[GET]::/payments/:id - Response has JSON Body", function () {+ pm.response.to.have.jsonBody();+});++// Set response object as internal variable+let jsonData = {};+try {+ jsonData = pm.response.json();+} catch (e) {}++// 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.",+ );+}++// Response body should have value "partially_captured" for "status"+if (jsonData?.status) {+ pm.test(+ "[POST]::/payments - Content check if value for 'status' matches 'partially_captured'",+ function () {+ pm.expect(jsonData.status).to.eql("partially_captured");+ },+ );+}++// Check if the "refunds" array exists+pm.test("Check if 'refunds' array exists", function() {+ pm.expect(jsonData.refunds).to.be.an("array");+});++// Check if there are exactly 2 items in the "refunds" array+pm.test("Check if there are 2 refunds", function() {+ pm.expect(jsonData.refunds.length).to.equal(2);+});++++diff --git a/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve Copy/request.json b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve Copy/request.jsonnew file mode 100644index 0000000000..b9ebc1be4a--- /dev/null+++ b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve Copy/request.json@@ -0,0 +1,33 @@+{+ "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/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve Copy/response.json b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve Copy/response.jsonnew file mode 100644index 0000000000..fe51488c70--- /dev/null+++ b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve Copy/response.json@@ -0,0 +1 @@+[]diff --git a/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve/.event.meta.json b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve/.event.meta.jsonnew file mode 100644index 0000000000..688c85746e--- /dev/null+++ b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve/.event.meta.json@@ -0,0 +1,5 @@+{+ "eventOrder": [+ "event.test.js"+ ]+}diff --git a/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve/event.test.js b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve/event.test.jsnew file mode 100644index 0000000000..89b1355575--- /dev/null+++ b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve/event.test.js@@ -0,0 +1,71 @@+// 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",+ );+});++// Validate if response has JSON Body+pm.test("[GET]::/payments/:id - Response has JSON Body", function () {+ pm.response.to.have.jsonBody();+});++// Set response object as internal variable+let jsonData = {};+try {+ jsonData = pm.response.json();+} catch (e) {}++// 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.",+ );+}++// Response body should have value "partially_captured" for "status"+if (jsonData?.status) {+ pm.test(+ "[POST]::/payments - Content check if value for 'status' matches 'partially_captured'",+ function () {+ pm.expect(jsonData.status).to.eql("partially_captured");+ },+ );+}diff --git a/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve/request.json b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve/request.jsonnew file mode 100644index 0000000000..b9ebc1be4a--- /dev/null+++ b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve/request.json@@ -0,0 +1,33 @@+{+ "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/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve/response.json b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve/response.jsonnew file mode 100644index 0000000000..fe51488c70--- /dev/null+++ b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve/response.json@@ -0,0 +1 @@+[]diff --git a/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create-copy/.event.meta.json b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create-copy/.event.meta.jsonnew file mode 100644index 0000000000..688c85746e--- /dev/null+++ b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create-copy/.event.meta.json@@ -0,0 +1,5 @@+{+ "eventOrder": [+ "event.test.js"+ ]+}diff --git a/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create-copy/event.test.js b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create-copy/event.test.jsnew file mode 100644index 0000000000..b0a888ae70--- /dev/null+++ b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create-copy/event.test.js@@ -0,0 +1,50 @@+// Validate status 2xx+pm.test("[POST]::/refunds - Status code is 2xx", function () {+ pm.response.to.be.success;+});++// Validate if response header has matching content-type+pm.test("[POST]::/refunds - 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) {}++// pm.collectionVariables - Set refund_id as variable for jsonData.payment_id+if (jsonData?.refund_id) {+ pm.collectionVariables.set("refund_id", jsonData.refund_id);+ console.log(+ "- use {{refund_id}} as collection variable for value",+ jsonData.refund_id,+ );+} else {+ console.log(+ "INFO - Unable to assign variable {{refund_id}}, as jsonData.refund_id is undefined.",+ );+}++// Response body should have value "succeeded" for "status"+if (jsonData?.status) {+ pm.test(+ "[POST]::/refunds - Content check if value for 'status' matches 'succeeded'",+ function () {+ pm.expect(jsonData.status).to.eql("succeeded");+ },+ );+}++// Response body should have value "6540" for "amount"+if (jsonData?.status) {+ pm.test(+ "[POST]::/refunds - Content check if value for 'amount' matches '6540'",+ function () {+ pm.expect(jsonData.amount).to.eql(2000);+ },+ );+}diff --git a/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create-copy/request.json b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create-copy/request.jsonnew file mode 100644index 0000000000..ff371b247d--- /dev/null+++ b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create-copy/request.json@@ -0,0 +1,42 @@+{+ "method": "POST",+ "header": [+ {+ "key": "Content-Type",+ "value": "application/json"+ },+ {+ "key": "Accept",+ "value": "application/json"+ }+ ],+ "body": {+ "mode": "raw",+ "options": {+ "raw": {+ "language": "json"+ }+ },+ "raw_json_formatted": {+ "payment_id": "{{payment_id}}",+ "amount": 2000,+ "reason": "Customer returned product",+ "refund_type": "instant",+ "metadata": {+ "udf1": "value1",+ "new_customer": "true",+ "login_date": "2019-09-10T10:11:12Z"+ }+ }+ },+ "url": {+ "raw": "{{baseUrl}}/refunds",+ "host": [+ "{{baseUrl}}"+ ],+ "path": [+ "refunds"+ ]+ },+ "description": "To create a refund against an already processed payment"+}diff --git a/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create-copy/response.json b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create-copy/response.jsonnew file mode 100644index 0000000000..fe51488c70--- /dev/null+++ b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create-copy/response.json@@ -0,0 +1 @@+[]diff --git a/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create/.event.meta.json b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create/.event.meta.jsonnew file mode 100644index 0000000000..688c85746e--- /dev/null+++ b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create/.event.meta.json@@ -0,0 +1,5 @@+{+ "eventOrder": [+ "event.test.js"+ ]+}diff --git a/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create/event.test.js b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create/event.test.jsnew file mode 100644index 0000000000..ccc9bf4702--- /dev/null+++ b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create/event.test.js@@ -0,0 +1,50 @@+// Validate status 2xx+pm.test("[POST]::/refunds - Status code is 2xx", function () {+ pm.response.to.be.success;+});++// Validate if response header has matching content-type+pm.test("[POST]::/refunds - 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) {}++// pm.collectionVariables - Set refund_id as variable for jsonData.payment_id+if (jsonData?.refund_id) {+ pm.collectionVariables.set("refund_id", jsonData.refund_id);+ console.log(+ "- use {{refund_id}} as collection variable for value",+ jsonData.refund_id,+ );+} else {+ console.log(+ "INFO - Unable to assign variable {{refund_id}}, as jsonData.refund_id is undefined.",+ );+}++// Response body should have value "succeeded" for "status"+if (jsonData?.status) {+ pm.test(+ "[POST]::/refunds - Content check if value for 'status' matches 'succeeded'",+ function () {+ pm.expect(jsonData.status).to.eql("succeeded");+ },+ );+}++// Response body should have value "6540" for "amount"+if (jsonData?.status) {+ pm.test(+ "[POST]::/refunds - Content check if value for 'amount' matches '4000'",+ function () {+ pm.expect(jsonData.amount).to.eql(4000);+ },+ );+}diff --git a/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create/request.json b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create/request.jsonnew file mode 100644index 0000000000..933f1a66ed--- /dev/null+++ b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create/request.json@@ -0,0 +1,42 @@+{+ "method": "POST",+ "header": [+ {+ "key": "Content-Type",+ "value": "application/json"+ },+ {+ "key": "Accept",+ "value": "application/json"+ }+ ],+ "body": {+ "mode": "raw",+ "options": {+ "raw": {+ "language": "json"+ }+ },+ "raw_json_formatted": {+ "payment_id": "{{payment_id}}",+ "amount": 4000,+ "reason": "Customer returned product",+ "refund_type": "instant",+ "metadata": {+ "udf1": "value1",+ "new_customer": "true",+ "login_date": "2019-09-10T10:11:12Z"+ }+ }+ },+ "url": {+ "raw": "{{baseUrl}}/refunds",+ "host": [+ "{{baseUrl}}"+ ],+ "path": [+ "refunds"+ ]+ },+ "description": "To create a refund against an already processed payment"+}diff --git a/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create/response.json b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create/response.jsonnew file mode 100644index 0000000000..fe51488c70--- /dev/null+++ b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create/response.json@@ -0,0 +1 @@+[]diff --git a/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Retrieve Copy/.event.meta.json b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Retrieve Copy/.event.meta.jsonnew file mode 100644index 0000000000..688c85746e--- /dev/null+++ b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Retrieve Copy/.event.meta.json@@ -0,0 +1,5 @@+{+ "eventOrder": [+ "event.test.js"+ ]+}diff --git a/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Retrieve Copy/event.test.js b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Retrieve Copy/event.test.jsnew file mode 100644index 0000000000..072e259d83--- /dev/null+++ b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Retrieve Copy/event.test.js@@ -0,0 +1,50 @@+// Validate status 2xx+pm.test("[GET]::/refunds/:id - Status code is 2xx", function () {+ pm.response.to.be.success;+});++// Validate if response header has matching content-type+pm.test("[GET]::/refunds/: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) {}++// pm.collectionVariables - Set refund_id as variable for jsonData.payment_id+if (jsonData?.refund_id) {+ pm.collectionVariables.set("refund_id", jsonData.refund_id);+ console.log(+ "- use {{refund_id}} as collection variable for value",+ jsonData.refund_id,+ );+} else {+ console.log(+ "INFO - Unable to assign variable {{refund_id}}, as jsonData.refund_id is undefined.",+ );+}++// Response body should have value "succeeded" for "status"+if (jsonData?.status) {+ pm.test(+ "[POST]::/refunds - Content check if value for 'status' matches 'succeeded'",+ function () {+ pm.expect(jsonData.status).to.eql("succeeded");+ },+ );+}++// Response body should have value "2000" for "amount"+if (jsonData?.status) {+ pm.test(+ "[POST]::/refunds - Content check if value for 'amount' matches '2000'",+ function () {+ pm.expect(jsonData.amount).to.eql(2000);+ },+ );+}diff --git a/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Retrieve Copy/request.json b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Retrieve Copy/request.jsonnew file mode 100644index 0000000000..6c28619e85--- /dev/null+++ b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Retrieve Copy/request.json@@ -0,0 +1,27 @@+{+ "method": "GET",+ "header": [+ {+ "key": "Accept",+ "value": "application/json"+ }+ ],+ "url": {+ "raw": "{{baseUrl}}/refunds/:id",+ "host": [+ "{{baseUrl}}"+ ],+ "path": [+ "refunds",+ ":id"+ ],+ "variable": [+ {+ "key": "id",+ "value": "{{refund_id}}",+ "description": "(Required) unique refund id"+ }+ ]+ },+ "description": "To retrieve the properties of a Refund. 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/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Retrieve Copy/response.json b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Retrieve Copy/response.jsonnew file mode 100644index 0000000000..fe51488c70--- /dev/null+++ b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Retrieve Copy/response.json@@ -0,0 +1 @@+[]diff --git a/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Validation should throw/.event.meta.json b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Validation should throw/.event.meta.jsonnew file mode 100644index 0000000000..688c85746e--- /dev/null+++ b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Validation should throw/.event.meta.json@@ -0,0 +1,5 @@+{+ "eventOrder": [+ "event.test.js"+ ]+}diff --git a/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Validation should throw/event.test.js b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Validation should throw/event.test.jsnew file mode 100644index 0000000000..71324af2c8--- /dev/null+++ b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Validation should throw/event.test.js@@ -0,0 +1,41 @@+// Validate status 2xx+pm.test("[POST]::/refunds - Status code is 4xx", function () {+ pm.response.to.be.error;+});++// Validate if response header has matching content-type+pm.test("[POST]::/refunds - 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) {}++// pm.collectionVariables - Set refund_id as variable for jsonData.payment_id+if (jsonData?.refund_id) {+ pm.collectionVariables.set("refund_id", jsonData.refund_id);+ console.log(+ "- use {{refund_id}} as collection variable for value",+ jsonData.refund_id,+ );+} else {+ console.log(+ "INFO - Unable to assign variable {{refund_id}}, as jsonData.refund_id is undefined.",+ );+}++// Response body should have value "succeeded" for "status"+if (jsonData?.error.message) {+ pm.test(+ "[POST]::/refunds - Content check if value for 'message' matches 'Refund amount exceeds the payment amount'",+ function () {+ pm.expect(jsonData.error.message).to.eql("Refund amount exceeds the payment amount");+ },+ );+}+diff --git a/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Validation should throw/request.json b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Validation should throw/request.jsonnew file mode 100644index 0000000000..ff371b247d--- /dev/null+++ b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Validation should throw/request.json@@ -0,0 +1,42 @@+{+ "method": "POST",+ "header": [+ {+ "key": "Content-Type",+ "value": "application/json"+ },+ {+ "key": "Accept",+ "value": "application/json"+ }+ ],+ "body": {+ "mode": "raw",+ "options": {+ "raw": {+ "language": "json"+ }+ },+ "raw_json_formatted": {+ "payment_id": "{{payment_id}}",+ "amount": 2000,+ "reason": "Customer returned product",+ "refund_type": "instant",+ "metadata": {+ "udf1": "value1",+ "new_customer": "true",+ "login_date": "2019-09-10T10:11:12Z"+ }+ }+ },+ "url": {+ "raw": "{{baseUrl}}/refunds",+ "host": [+ "{{baseUrl}}"+ ],+ "path": [+ "refunds"+ ]+ },+ "description": "To create a refund against an already processed payment"+}diff --git a/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Validation should throw/response.json b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Validation should throw/response.jsonnew file mode 100644index 0000000000..fe51488c70--- /dev/null+++ b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Validation should throw/response.json@@ -0,0 +1 @@+[]diff --git a/postman/collection-dir/bluesnap/Flow Testcases/QuickStart/Payment Connector - Create/request.json b/postman/collection-dir/bluesnap/Flow Testcases/QuickStart/Payment Connector - Create/request.jsonindex ef3bdcd3aa..4609a01005 100644--- a/postman/collection-dir/bluesnap/Flow Testcases/QuickStart/Payment Connector - Create/request.json+++ b/postman/collection-dir/bluesnap/Flow Testcases/QuickStart/Payment Connector - Create/request.json@@ -53,7 +53,25 @@"payment_method_types": [{"payment_method_type": "credit",- "card_networks": ["Visa", "Mastercard"],+ "card_networks": ["AmericanExpress",+ "Discover",+ "Interac",+ "JCB",+ "Mastercard",+ "Visa", "DinersClub","UnionPay","RuPay"],+ "minimum_amount": 1,+ "maximum_amount": 68607706,+ "recurring_enabled": true,+ "installment_payment_enabled": true+ },+ {+ "payment_method_type": "debit",+ "card_networks": ["AmericanExpress",+ "Discover",+ "Interac",+ "JCB",+ "Mastercard",+ "Visa", "DinersClub","UnionPay","RuPay"],"minimum_amount": 1,"maximum_amount": 68607706,"recurring_enabled": true,diff --git a/postman/collection-dir/checkout/Flow Testcases/QuickStart/Payment Connector - Create/request.json b/postman/collection-dir/checkout/Flow Testcases/QuickStart/Payment Connector - Create/request.jsonindex 0f14659a5e..c0f6521a5c 100644--- a/postman/collection-dir/checkout/Flow Testcases/QuickStart/Payment Connector - Create/request.json+++ b/postman/collection-dir/checkout/Flow Testcases/QuickStart/Payment Connector - Create/request.json@@ -56,7 +56,12 @@"payment_method_types": [{"payment_method_type": "credit",- "card_networks": ["Visa", "Mastercard"],+ "card_networks": ["AmericanExpress",+ "Discover",+ "Interac",+ "JCB",+ "Mastercard",+ "Visa", "DinersClub","UnionPay","RuPay"],"minimum_amount": 1,"maximum_amount": 68607706,"recurring_enabled": true,@@ -64,7 +69,12 @@},{"payment_method_type": "debit",- "card_networks": ["Visa", "Mastercard"],+ "card_networks": ["AmericanExpress",+ "Discover",+ "Interac",+ "JCB",+ "Mastercard",+ "Visa", "DinersClub","UnionPay","RuPay"],"minimum_amount": 1,"maximum_amount": 68607706,"recurring_enabled": true,diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/.meta.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/.meta.jsonnew file mode 100644index 0000000000..6626732a3c--- /dev/null+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/.meta.json@@ -0,0 +1,12 @@+{+ "childrenOrder": [+ "Payments - Create",+ "Payments - Capture",+ "Payments - Retrieve",+ "Refunds - Create",+ "Refunds - Create-copy",+ "Refunds - Retrieve Copy",+ "Refunds - Validation should throw",+ "Payments - Retrieve Copy"+ ]+}diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Capture/.event.meta.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Capture/.event.meta.jsonnew file mode 100644index 0000000000..688c85746e--- /dev/null+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Capture/.event.meta.json@@ -0,0 +1,5 @@+{+ "eventOrder": [+ "event.test.js"+ ]+}diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Capture/event.test.js b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Capture/event.test.jsnew file mode 100644index 0000000000..96d9878078--- /dev/null+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Capture/event.test.js@@ -0,0 +1,105 @@+// Validate status 2xx+pm.test("[POST]::/payments/:id/capture - Status code is 2xx", function () {+ pm.response.to.be.success;+});++// Validate if response header has matching content-type+pm.test(+ "[POST]::/payments/:id/capture - Content-Type is application/json",+ function () {+ pm.expect(pm.response.headers.get("Content-Type")).to.include(+ "application/json",+ );+ },+);++// Validate if response has JSON Body+pm.test("[POST]::/payments/:id/capture - Response has JSON Body", function () {+ pm.response.to.have.jsonBody();+});++// Set response object as internal variable+let jsonData = {};+try {+ jsonData = pm.response.json();+} catch (e) {}++// 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.",+ );+}++// 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 'partially_captured'",+ function () {+ pm.expect(jsonData.status).to.eql("partially_captured");+ },+ );+}++// Response body should have value "6540" for "amount"+if (jsonData?.amount) {+ pm.test(+ "[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"+if (jsonData?.amount_received) {+ pm.test(+ "[POST]::/payments:id/capture - Content check if value for 'amount_received' matches '6000'",+ function () {+ pm.expect(jsonData.amount_received).to.eql(6000);+ },+ );+}++// Response body should have value "0" for "amount_received"+if (jsonData?.amount_capturable) {+ pm.test(+ "[POST]::/payments:id/capture - Content check if value for 'amount_capturable' matches '0'",+ function () {+ pm.expect(jsonData.amount_capturable).to.eql(0);+ },+ );+}+diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Capture/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Capture/request.jsonnew file mode 100644index 0000000000..8975575ca4--- /dev/null+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Capture/request.json@@ -0,0 +1,45 @@+{+ "method": "POST",+ "header": [+ {+ "key": "Content-Type",+ "value": "application/json"+ },+ {+ "key": "Accept",+ "value": "application/json"+ }+ ],+ "body": {+ "mode": "raw",+ "options": {+ "raw": {+ "language": "json"+ }+ },+ "raw_json_formatted": {+ "amount_to_capture": 6000,+ "statement_descriptor_name": "Joseph",+ "statement_descriptor_suffix": "JS"+ }+ },+ "url": {+ "raw": "{{baseUrl}}/payments/:id/capture",+ "host": [+ "{{baseUrl}}"+ ],+ "path": [+ "payments",+ ":id",+ "capture"+ ],+ "variable": [+ {+ "key": "id",+ "value": "{{payment_id}}",+ "description": "(Required) unique payment id"+ }+ ]+ },+ "description": "To capture the funds for an uncaptured payment"+}diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Capture/response.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Capture/response.jsonnew file mode 100644index 0000000000..fe51488c70--- /dev/null+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Capture/response.json@@ -0,0 +1 @@+[]diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Create/.event.meta.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Create/.event.meta.jsonnew file mode 100644index 0000000000..688c85746e--- /dev/null+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Create/.event.meta.json@@ -0,0 +1,5 @@+{+ "eventOrder": [+ "event.test.js"+ ]+}diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Create/event.test.js b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Create/event.test.jsnew file mode 100644index 0000000000..d683186aa0--- /dev/null+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Create/event.test.js@@ -0,0 +1,71 @@+// Validate status 2xx+pm.test("[POST]::/payments - Status code is 2xx", function () {+ pm.response.to.be.success;+});++// 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",+ );+});++// Validate if response has JSON Body+pm.test("[POST]::/payments - Response has JSON Body", function () {+ pm.response.to.have.jsonBody();+});++// Set response object as internal variable+let jsonData = {};+try {+ jsonData = pm.response.json();+} catch (e) {}++// 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.",+ );+}++// Response body should have value "requires_capture" for "status"+if (jsonData?.status) {+ pm.test(+ "[POST]::/payments - Content check if value for 'status' matches 'requires_capture'",+ function () {+ pm.expect(jsonData.status).to.eql("requires_capture");+ },+ );+}diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Create/request.jsonnew file mode 100644index 0000000000..0fbd6a4dcd--- /dev/null+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Create/request.json@@ -0,0 +1,92 @@+{+ "method": "POST",+ "header": [+ {+ "key": "Content-Type",+ "value": "application/json"+ },+ {+ "key": "Accept",+ "value": "application/json"+ }+ ],+ "body": {+ "mode": "raw",+ "options": {+ "raw": {+ "language": "json"+ }+ },+ "raw_json_formatted": {+ "amount": 6540,+ "currency": "USD",+ "confirm": true,+ "capture_method": "manual",+ "capture_on": "2022-09-10T10:11:12Z",+ "amount_to_capture": 6540,+ "customer_id": "StripeCustomer",+ "email": "[email protected]",+ "name": "John Doe",+ "phone": "999999999",+ "phone_country_code": "+65",+ "description": "Its my first payment request",+ "authentication_type": "no_three_ds",+ "return_url": "https://duck.com",+ "payment_method": "card",+ "payment_method_data": {+ "card": {+ "card_number": "4242424242424242",+ "card_exp_month": "10",+ "card_exp_year": "25",+ "card_holder_name": "joseph Doe",+ "card_cvc": "123"+ }+ },+ "billing": {+ "address": {+ "line1": "1467",+ "line2": "Harrison Street",+ "line3": "Harrison Street",+ "city": "San Fransico",+ "state": "California",+ "zip": "94122",+ "country": "US",+ "first_name": "sundari"+ }+ },+ "shipping": {+ "address": {+ "line1": "1467",+ "line2": "Harrison Street",+ "line3": "Harrison Street",+ "city": "San Fransico",+ "state": "California",+ "zip": "94122",+ "country": "US",+ "first_name": "sundari"+ }+ },+ "statement_descriptor_name": "joseph",+ "statement_descriptor_suffix": "JS",+ "metadata": {+ "udf1": "value1",+ "new_customer": "true",+ "login_date": "2019-09-10T10:11:12Z"+ },+ "routing": {+ "type": "single",+ "data": "stripe"+ }+ }+ },+ "url": {+ "raw": "{{baseUrl}}/payments",+ "host": [+ "{{baseUrl}}"+ ],+ "path": [+ "payments"+ ]+ },+ "description": "To process a payment you will have to create a payment, attach a payment method and confirm. Depending on the user journey you wish to achieve, you may opt to all the steps in a single request or in a sequence of API request using following APIs: (i) Payments - Update, (ii) Payments - Confirm, and (iii) Payments - Capture"+}diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Create/response.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Create/response.jsonnew file mode 100644index 0000000000..fe51488c70--- /dev/null+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Create/response.json@@ -0,0 +1 @@+[]diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve Copy/.event.meta.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve Copy/.event.meta.jsonnew file mode 100644index 0000000000..688c85746e--- /dev/null+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve Copy/.event.meta.json@@ -0,0 +1,5 @@+{+ "eventOrder": [+ "event.test.js"+ ]+}diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve Copy/event.test.js b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve Copy/event.test.jsnew file mode 100644index 0000000000..3342e5b253--- /dev/null+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve Copy/event.test.js@@ -0,0 +1,85 @@+// 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",+ );+});++// Validate if response has JSON Body+pm.test("[GET]::/payments/:id - Response has JSON Body", function () {+ pm.response.to.have.jsonBody();+});++// Set response object as internal variable+let jsonData = {};+try {+ jsonData = pm.response.json();+} catch (e) {}++// 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.",+ );+}++// Response body should have value "partially_captured" for "status"+if (jsonData?.status) {+ pm.test(+ "[POST]::/payments - Content check if value for 'status' matches 'partially_captured'",+ function () {+ pm.expect(jsonData.status).to.eql("partially_captured");+ },+ );+}++// Check if the "refunds" array exists+pm.test("Check if 'refunds' array exists", function() {+ pm.expect(jsonData.refunds).to.be.an("array");+});++// Check if there are exactly 2 items in the "refunds" array+pm.test("Check if there are 2 refunds", function() {+ pm.expect(jsonData.refunds.length).to.equal(2);+});++++diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve Copy/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve Copy/request.jsonnew file mode 100644index 0000000000..b9ebc1be4a--- /dev/null+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve Copy/request.json@@ -0,0 +1,33 @@+{+ "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/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve Copy/response.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve Copy/response.jsonnew file mode 100644index 0000000000..fe51488c70--- /dev/null+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve Copy/response.json@@ -0,0 +1 @@+[]diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve/.event.meta.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve/.event.meta.jsonnew file mode 100644index 0000000000..688c85746e--- /dev/null+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve/.event.meta.json@@ -0,0 +1,5 @@+{+ "eventOrder": [+ "event.test.js"+ ]+}diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve/event.test.js b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve/event.test.jsnew file mode 100644index 0000000000..89b1355575--- /dev/null+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve/event.test.js@@ -0,0 +1,71 @@+// 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",+ );+});++// Validate if response has JSON Body+pm.test("[GET]::/payments/:id - Response has JSON Body", function () {+ pm.response.to.have.jsonBody();+});++// Set response object as internal variable+let jsonData = {};+try {+ jsonData = pm.response.json();+} catch (e) {}++// 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.",+ );+}++// Response body should have value "partially_captured" for "status"+if (jsonData?.status) {+ pm.test(+ "[POST]::/payments - Content check if value for 'status' matches 'partially_captured'",+ function () {+ pm.expect(jsonData.status).to.eql("partially_captured");+ },+ );+}diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve/request.jsonnew file mode 100644index 0000000000..b9ebc1be4a--- /dev/null+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve/request.json@@ -0,0 +1,33 @@+{+ "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/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve/response.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve/response.jsonnew file mode 100644index 0000000000..fe51488c70--- /dev/null+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Retrieve/response.json@@ -0,0 +1 @@+[]diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create-copy/.event.meta.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create-copy/.event.meta.jsonnew file mode 100644index 0000000000..688c85746e--- /dev/null+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create-copy/.event.meta.json@@ -0,0 +1,5 @@+{+ "eventOrder": [+ "event.test.js"+ ]+}diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create-copy/event.test.js b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create-copy/event.test.jsnew file mode 100644index 0000000000..b0a888ae70--- /dev/null+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create-copy/event.test.js@@ -0,0 +1,50 @@+// Validate status 2xx+pm.test("[POST]::/refunds - Status code is 2xx", function () {+ pm.response.to.be.success;+});++// Validate if response header has matching content-type+pm.test("[POST]::/refunds - 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) {}++// pm.collectionVariables - Set refund_id as variable for jsonData.payment_id+if (jsonData?.refund_id) {+ pm.collectionVariables.set("refund_id", jsonData.refund_id);+ console.log(+ "- use {{refund_id}} as collection variable for value",+ jsonData.refund_id,+ );+} else {+ console.log(+ "INFO - Unable to assign variable {{refund_id}}, as jsonData.refund_id is undefined.",+ );+}++// Response body should have value "succeeded" for "status"+if (jsonData?.status) {+ pm.test(+ "[POST]::/refunds - Content check if value for 'status' matches 'succeeded'",+ function () {+ pm.expect(jsonData.status).to.eql("succeeded");+ },+ );+}++// Response body should have value "6540" for "amount"+if (jsonData?.status) {+ pm.test(+ "[POST]::/refunds - Content check if value for 'amount' matches '6540'",+ function () {+ pm.expect(jsonData.amount).to.eql(2000);+ },+ );+}diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create-copy/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create-copy/request.jsonnew file mode 100644index 0000000000..ff371b247d--- /dev/null+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create-copy/request.json@@ -0,0 +1,42 @@+{+ "method": "POST",+ "header": [+ {+ "key": "Content-Type",+ "value": "application/json"+ },+ {+ "key": "Accept",+ "value": "application/json"+ }+ ],+ "body": {+ "mode": "raw",+ "options": {+ "raw": {+ "language": "json"+ }+ },+ "raw_json_formatted": {+ "payment_id": "{{payment_id}}",+ "amount": 2000,+ "reason": "Customer returned product",+ "refund_type": "instant",+ "metadata": {+ "udf1": "value1",+ "new_customer": "true",+ "login_date": "2019-09-10T10:11:12Z"+ }+ }+ },+ "url": {+ "raw": "{{baseUrl}}/refunds",+ "host": [+ "{{baseUrl}}"+ ],+ "path": [+ "refunds"+ ]+ },+ "description": "To create a refund against an already processed payment"+}diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create-copy/response.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create-copy/response.jsonnew file mode 100644index 0000000000..fe51488c70--- /dev/null+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create-copy/response.json@@ -0,0 +1 @@+[]diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create/.event.meta.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create/.event.meta.jsonnew file mode 100644index 0000000000..688c85746e--- /dev/null+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create/.event.meta.json@@ -0,0 +1,5 @@+{+ "eventOrder": [+ "event.test.js"+ ]+}diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create/event.test.js b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create/event.test.jsnew file mode 100644index 0000000000..ccc9bf4702--- /dev/null+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create/event.test.js@@ -0,0 +1,50 @@+// Validate status 2xx+pm.test("[POST]::/refunds - Status code is 2xx", function () {+ pm.response.to.be.success;+});++// Validate if response header has matching content-type+pm.test("[POST]::/refunds - 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) {}++// pm.collectionVariables - Set refund_id as variable for jsonData.payment_id+if (jsonData?.refund_id) {+ pm.collectionVariables.set("refund_id", jsonData.refund_id);+ console.log(+ "- use {{refund_id}} as collection variable for value",+ jsonData.refund_id,+ );+} else {+ console.log(+ "INFO - Unable to assign variable {{refund_id}}, as jsonData.refund_id is undefined.",+ );+}++// Response body should have value "succeeded" for "status"+if (jsonData?.status) {+ pm.test(+ "[POST]::/refunds - Content check if value for 'status' matches 'succeeded'",+ function () {+ pm.expect(jsonData.status).to.eql("succeeded");+ },+ );+}++// Response body should have value "6540" for "amount"+if (jsonData?.status) {+ pm.test(+ "[POST]::/refunds - Content check if value for 'amount' matches '4000'",+ function () {+ pm.expect(jsonData.amount).to.eql(4000);+ },+ );+}diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create/request.jsonnew file mode 100644index 0000000000..933f1a66ed--- /dev/null+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create/request.json@@ -0,0 +1,42 @@+{+ "method": "POST",+ "header": [+ {+ "key": "Content-Type",+ "value": "application/json"+ },+ {+ "key": "Accept",+ "value": "application/json"+ }+ ],+ "body": {+ "mode": "raw",+ "options": {+ "raw": {+ "language": "json"+ }+ },+ "raw_json_formatted": {+ "payment_id": "{{payment_id}}",+ "amount": 4000,+ "reason": "Customer returned product",+ "refund_type": "instant",+ "metadata": {+ "udf1": "value1",+ "new_customer": "true",+ "login_date": "2019-09-10T10:11:12Z"+ }+ }+ },+ "url": {+ "raw": "{{baseUrl}}/refunds",+ "host": [+ "{{baseUrl}}"+ ],+ "path": [+ "refunds"+ ]+ },+ "description": "To create a refund against an already processed payment"+}diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create/response.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create/response.jsonnew file mode 100644index 0000000000..fe51488c70--- /dev/null+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Create/response.json@@ -0,0 +1 @@+[]diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Retrieve Copy/.event.meta.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Retrieve Copy/.event.meta.jsonnew file mode 100644index 0000000000..688c85746e--- /dev/null+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Retrieve Copy/.event.meta.json@@ -0,0 +1,5 @@+{+ "eventOrder": [+ "event.test.js"+ ]+}diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Retrieve Copy/event.test.js b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Retrieve Copy/event.test.jsnew file mode 100644index 0000000000..072e259d83--- /dev/null+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Retrieve Copy/event.test.js@@ -0,0 +1,50 @@+// Validate status 2xx+pm.test("[GET]::/refunds/:id - Status code is 2xx", function () {+ pm.response.to.be.success;+});++// Validate if response header has matching content-type+pm.test("[GET]::/refunds/: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) {}++// pm.collectionVariables - Set refund_id as variable for jsonData.payment_id+if (jsonData?.refund_id) {+ pm.collectionVariables.set("refund_id", jsonData.refund_id);+ console.log(+ "- use {{refund_id}} as collection variable for value",+ jsonData.refund_id,+ );+} else {+ console.log(+ "INFO - Unable to assign variable {{refund_id}}, as jsonData.refund_id is undefined.",+ );+}++// Response body should have value "succeeded" for "status"+if (jsonData?.status) {+ pm.test(+ "[POST]::/refunds - Content check if value for 'status' matches 'succeeded'",+ function () {+ pm.expect(jsonData.status).to.eql("succeeded");+ },+ );+}++// Response body should have value "2000" for "amount"+if (jsonData?.status) {+ pm.test(+ "[POST]::/refunds - Content check if value for 'amount' matches '2000'",+ function () {+ pm.expect(jsonData.amount).to.eql(2000);+ },+ );+}diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Retrieve Copy/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Retrieve Copy/request.jsonnew file mode 100644index 0000000000..6c28619e85--- /dev/null+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Retrieve Copy/request.json@@ -0,0 +1,27 @@+{+ "method": "GET",+ "header": [+ {+ "key": "Accept",+ "value": "application/json"+ }+ ],+ "url": {+ "raw": "{{baseUrl}}/refunds/:id",+ "host": [+ "{{baseUrl}}"+ ],+ "path": [+ "refunds",+ ":id"+ ],+ "variable": [+ {+ "key": "id",+ "value": "{{refund_id}}",+ "description": "(Required) unique refund id"+ }+ ]+ },+ "description": "To retrieve the properties of a Refund. 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/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Retrieve Copy/response.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Retrieve Copy/response.jsonnew file mode 100644index 0000000000..fe51488c70--- /dev/null+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Retrieve Copy/response.json@@ -0,0 +1 @@+[]diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Validation should throw/.event.meta.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Validation should throw/.event.meta.jsonnew file mode 100644index 0000000000..688c85746e--- /dev/null+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Validation should throw/.event.meta.json@@ -0,0 +1,5 @@+{+ "eventOrder": [+ "event.test.js"+ ]+}diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Validation should throw/event.test.js b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Validation should throw/event.test.jsnew file mode 100644index 0000000000..71324af2c8--- /dev/null+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Validation should throw/event.test.js@@ -0,0 +1,41 @@+// Validate status 2xx+pm.test("[POST]::/refunds - Status code is 4xx", function () {+ pm.response.to.be.error;+});++// Validate if response header has matching content-type+pm.test("[POST]::/refunds - 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) {}++// pm.collectionVariables - Set refund_id as variable for jsonData.payment_id+if (jsonData?.refund_id) {+ pm.collectionVariables.set("refund_id", jsonData.refund_id);+ console.log(+ "- use {{refund_id}} as collection variable for value",+ jsonData.refund_id,+ );+} else {+ console.log(+ "INFO - Unable to assign variable {{refund_id}}, as jsonData.refund_id is undefined.",+ );+}++// Response body should have value "succeeded" for "status"+if (jsonData?.error.message) {+ pm.test(+ "[POST]::/refunds - Content check if value for 'message' matches 'Refund amount exceeds the payment amount'",+ function () {+ pm.expect(jsonData.error.message).to.eql("Refund amount exceeds the payment amount");+ },+ );+}+diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Validation should throw/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Validation should throw/request.jsonnew file mode 100644index 0000000000..ff371b247d--- /dev/null+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Validation should throw/request.json@@ -0,0 +1,42 @@+{+ "method": "POST",+ "header": [+ {+ "key": "Content-Type",+ "value": "application/json"+ },+ {+ "key": "Accept",+ "value": "application/json"+ }+ ],+ "body": {+ "mode": "raw",+ "options": {+ "raw": {+ "language": "json"+ }+ },+ "raw_json_formatted": {+ "payment_id": "{{payment_id}}",+ "amount": 2000,+ "reason": "Customer returned product",+ "refund_type": "instant",+ "metadata": {+ "udf1": "value1",+ "new_customer": "true",+ "login_date": "2019-09-10T10:11:12Z"+ }+ }+ },+ "url": {+ "raw": "{{baseUrl}}/refunds",+ "host": [+ "{{baseUrl}}"+ ],+ "path": [+ "refunds"+ ]+ },+ "description": "To create a refund against an already processed payment"+}diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Validation should throw/response.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Validation should throw/response.jsonnew file mode 100644index 0000000000..fe51488c70--- /dev/null+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Refunds - Validation should throw/response.json@@ -0,0 +1 @@+[]diff --git a/postman/collection-dir/stripe/Flow Testcases/QuickStart/Payment Connector - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/QuickStart/Payment Connector - Create/request.jsonindex 474b4d1e1e..291a5bf84b 100644--- a/postman/collection-dir/stripe/Flow Testcases/QuickStart/Payment Connector - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/QuickStart/Payment Connector - Create/request.json@@ -211,7 +211,12 @@"maximum_amount": 68607706,"recurring_enabled": true,"installment_payment_enabled": true,- "card_networks": ["Visa", "Mastercard"]+ "card_networks": ["AmericanExpress",+ "Discover",+ "Interac",+ "JCB",+ "Mastercard",+ "Visa", "DinersClub","UnionPay","RuPay"]}]},@@ -224,7 +229,12 @@"maximum_amount": 68607706,"recurring_enabled": true,"installment_payment_enabled": true,- "card_networks": ["Visa", "Mastercard"]+ "card_networks": ["AmericanExpress",+ "Discover",+ "Interac",+ "JCB",+ "Mastercard",+ "Visa", "DinersClub","UnionPay","RuPay"]}]},