mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 00:49:42 +08:00
ci(postman): Add browser info for adyen postman collection (#5927)
This commit is contained in:
@ -7,18 +7,18 @@
|
||||
"Scenario5-Void the payment",
|
||||
"Scenario6-Create 3DS payment",
|
||||
"Scenario7-Create 3DS payment with confirm false",
|
||||
"Scenario9-Refund full payment",
|
||||
"Scenario10-Create a mandate and recurring payment",
|
||||
"Scenario11-Partial refund",
|
||||
"Scenario12-Bank Redirect-sofort",
|
||||
"Scenario13-Bank Redirect-eps",
|
||||
"Scenario14-Refund recurring payment",
|
||||
"Scenario15-Bank Redirect-giropay",
|
||||
"Scenario16-Bank debit-ach",
|
||||
"Scenario17-Bank debit-Bacs",
|
||||
"Scenario18-Bank Redirect-Trustly",
|
||||
"Scenario19-Add card flow",
|
||||
"Scenario20-Pass Invalid CVV for save card flow and verify failed payment",
|
||||
"Scenario21-Don't Pass CVV for save card flow and verify failed payment Copy"
|
||||
"Scenario8-Refund full payment",
|
||||
"Scenario9-Create a mandate and recurring payment",
|
||||
"Scenario10-Partial refund",
|
||||
"Scenario11-Bank Redirect-sofort",
|
||||
"Scenario12-Bank Redirect-eps",
|
||||
"Scenario13-Refund recurring payment",
|
||||
"Scenario14-Bank debit-ach",
|
||||
"Scenario15-Bank debit-Bacs",
|
||||
"Scenario16-Bank Redirect-Trustly",
|
||||
"Scenario17-Add card flow",
|
||||
"Scenario18-Pass Invalid CVV for save card flow and verify failed payment",
|
||||
"Scenario19-Don't Pass CVV for save card flow and verify failed payment Copy",
|
||||
"Scenario20-Create Gift Card payment"
|
||||
]
|
||||
}
|
||||
@ -36,11 +36,11 @@
|
||||
"payment_method_type": "credit",
|
||||
"payment_method_data": {
|
||||
"card": {
|
||||
"card_number": "371449635398431",
|
||||
"card_number": "4111111111111111",
|
||||
"card_exp_month": "03",
|
||||
"card_exp_year": "2030",
|
||||
"card_holder_name": "joseph Doe",
|
||||
"card_cvc": "7373"
|
||||
"card_cvc": "737"
|
||||
}
|
||||
},
|
||||
"billing": {
|
||||
@ -73,6 +73,17 @@
|
||||
"udf1": "value1",
|
||||
"new_customer": "true",
|
||||
"login_date": "2019-09-10T10:11:12Z"
|
||||
},
|
||||
"browser_info": {
|
||||
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36",
|
||||
"accept_header": "text\\/html,application\\/xhtml+xml,application\\/xml;q=0.9,image\\/webp,image\\/apng,*\\/*;q=0.8",
|
||||
"language": "en-GB",
|
||||
"color_depth": 30,
|
||||
"screen_height": 1117,
|
||||
"screen_width": 1728,
|
||||
"time_zone": -330,
|
||||
"java_enabled": true,
|
||||
"java_script_enabled": true
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@ -36,11 +36,11 @@
|
||||
"payment_method_type": "credit",
|
||||
"payment_method_data": {
|
||||
"card": {
|
||||
"card_number": "371449635398431",
|
||||
"card_number": "4111111111111111",
|
||||
"card_exp_month": "03",
|
||||
"card_exp_year": "2030",
|
||||
"card_holder_name": "joseph Doe",
|
||||
"card_cvc": "7373"
|
||||
"card_cvc": "737"
|
||||
}
|
||||
},
|
||||
"billing": {
|
||||
@ -73,6 +73,17 @@
|
||||
"udf1": "value1",
|
||||
"new_customer": "true",
|
||||
"login_date": "2019-09-10T10:11:12Z"
|
||||
},
|
||||
"browser_info": {
|
||||
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36",
|
||||
"accept_header": "text\\/html,application\\/xhtml+xml,application\\/xml;q=0.9,image\\/webp,image\\/apng,*\\/*;q=0.8",
|
||||
"language": "en-GB",
|
||||
"color_depth": 30,
|
||||
"screen_height": 1117,
|
||||
"screen_width": 1728,
|
||||
"time_zone": -330,
|
||||
"java_enabled": true,
|
||||
"java_script_enabled": true
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -36,11 +36,11 @@
|
||||
"payment_method_type": "credit",
|
||||
"payment_method_data": {
|
||||
"card": {
|
||||
"card_number": "371449635398431",
|
||||
"card_number": "4111111111111111",
|
||||
"card_exp_month": "03",
|
||||
"card_exp_year": "2030",
|
||||
"card_holder_name": "joseph Doe",
|
||||
"card_cvc": "7373"
|
||||
"card_cvc": "737"
|
||||
}
|
||||
},
|
||||
"setup_future_usage": "off_session",
|
||||
@ -78,7 +78,7 @@
|
||||
"zip": "94122",
|
||||
"country": "US",
|
||||
"first_name": "Joseph",
|
||||
"last_name":"Doe"
|
||||
"last_name": "Doe"
|
||||
}
|
||||
},
|
||||
"billing": {
|
||||
@ -91,7 +91,7 @@
|
||||
"zip": "94122",
|
||||
"country": "US",
|
||||
"first_name": "Joseph",
|
||||
"last_name":"Doe"
|
||||
"last_name": "Doe"
|
||||
}
|
||||
},
|
||||
"statement_descriptor_name": "joseph",
|
||||
@ -100,6 +100,17 @@
|
||||
"udf1": "value1",
|
||||
"new_customer": "true",
|
||||
"login_date": "2019-09-10T10:11:12Z"
|
||||
},
|
||||
"browser_info": {
|
||||
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36",
|
||||
"accept_header": "text\\/html,application\\/xhtml+xml,application\\/xml;q=0.9,image\\/webp,image\\/apng,*\\/*;q=0.8",
|
||||
"language": "en-GB",
|
||||
"color_depth": 30,
|
||||
"screen_height": 1117,
|
||||
"screen_width": 1728,
|
||||
"time_zone": -330,
|
||||
"java_enabled": true,
|
||||
"java_script_enabled": true
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -1,103 +0,0 @@
|
||||
// Validate status 2xx
|
||||
pm.test("[POST]::/payments/:id/confirm - Status code is 2xx", function () {
|
||||
pm.response.to.be.success;
|
||||
});
|
||||
|
||||
// Validate if response header has matching content-type
|
||||
pm.test(
|
||||
"[POST]::/payments/:id/confirm - 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/confirm - 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_customer_action" for "status"
|
||||
if (jsonData?.status) {
|
||||
pm.test(
|
||||
"[POST]::/payments/:id/confirm - Content check if value for 'status' matches 'requires_customer_action'",
|
||||
function () {
|
||||
pm.expect(jsonData.status).to.eql("requires_customer_action");
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
// Response body should have "next_action.redirect_to_url"
|
||||
pm.test(
|
||||
"[POST]::/payments - Content check if 'next_action.redirect_to_url' exists",
|
||||
function () {
|
||||
pm.expect(typeof jsonData.next_action.redirect_to_url !== "undefined").to.be
|
||||
.true;
|
||||
},
|
||||
);
|
||||
|
||||
// Response body should have value "giropay" for "payment_method_type"
|
||||
if (jsonData?.payment_method_type) {
|
||||
pm.test(
|
||||
"[POST]::/payments/:id/confirm - Content check if value for 'payment_method_type' matches 'giropay'",
|
||||
function () {
|
||||
pm.expect(jsonData.payment_method_type).to.eql("giropay");
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
// Response body should have value "stripe" for "connector"
|
||||
if (jsonData?.connector) {
|
||||
pm.test(
|
||||
"[POST]::/payments/:id/confirm - Content check if value for 'connector' matches 'adyen'",
|
||||
function () {
|
||||
pm.expect(jsonData.connector).to.eql("adyen");
|
||||
},
|
||||
);
|
||||
}
|
||||
@ -1,83 +0,0 @@
|
||||
{
|
||||
"auth": {
|
||||
"type": "apikey",
|
||||
"apikey": [
|
||||
{
|
||||
"key": "value",
|
||||
"value": "{{publishable_key}}",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"key": "key",
|
||||
"value": "api-key",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"key": "in",
|
||||
"value": "header",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json"
|
||||
},
|
||||
{
|
||||
"key": "Accept",
|
||||
"value": "application/json"
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
},
|
||||
"raw_json_formatted": {
|
||||
"client_secret": "{{client_secret}}",
|
||||
"payment_method": "bank_redirect",
|
||||
"payment_method_type": "giropay",
|
||||
"payment_method_data": {
|
||||
"bank_redirect": {
|
||||
"giropay": {
|
||||
"billing_details": {
|
||||
"billing_name": "John Doe"
|
||||
},
|
||||
"bank_name": "ing",
|
||||
"preferred_language": "en",
|
||||
"country": "DE"
|
||||
}
|
||||
}
|
||||
},
|
||||
"browser_info": {
|
||||
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
|
||||
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
|
||||
"language": "nl-NL",
|
||||
"color_depth": 24,
|
||||
"screen_height": 723,
|
||||
"screen_width": 1536,
|
||||
"time_zone": 0,
|
||||
"java_enabled": true,
|
||||
"java_script_enabled": true,
|
||||
"ip_address": "127.0.0.1"
|
||||
}
|
||||
}
|
||||
},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/payments/:id/confirm",
|
||||
"host": ["{{baseUrl}}"],
|
||||
"path": ["payments", ":id", "confirm"],
|
||||
"variable": [
|
||||
{
|
||||
"key": "id",
|
||||
"value": "{{payment_id}}",
|
||||
"description": "(Required) unique payment id"
|
||||
}
|
||||
]
|
||||
},
|
||||
"description": "This API is to confirm the payment request and forward payment to the payment processor. This API provides more granular control upon when the API is forwarded to the payment processor. Alternatively you can confirm the payment within the Payments-Create API"
|
||||
}
|
||||
@ -1,88 +0,0 @@
|
||||
{
|
||||
"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": 1000,
|
||||
"currency": "EUR",
|
||||
"confirm": false,
|
||||
"capture_method": "automatic",
|
||||
"capture_on": "2022-09-10T10:11:12Z",
|
||||
"amount_to_capture": 1000,
|
||||
"customer_id": "StripeCustomer",
|
||||
"email": "abcdef123@gmail.com",
|
||||
"name": "John Doe",
|
||||
"phone": "999999999",
|
||||
"phone_country_code": "+65",
|
||||
"description": "Its my first payment request",
|
||||
"authentication_type": "three_ds",
|
||||
"return_url": "https://duck.com",
|
||||
"billing": {
|
||||
"address": {
|
||||
"first_name": "John",
|
||||
"last_name": "Doe",
|
||||
"line1": "1467",
|
||||
"line2": "Harrison Street",
|
||||
"line3": "Harrison Street",
|
||||
"city": "San Fransico",
|
||||
"state": "California",
|
||||
"zip": "94122",
|
||||
"country": "DE"
|
||||
}
|
||||
},
|
||||
"browser_info": {
|
||||
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
|
||||
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
|
||||
"language": "nl-NL",
|
||||
"color_depth": 24,
|
||||
"screen_height": 723,
|
||||
"screen_width": 1536,
|
||||
"time_zone": 0,
|
||||
"java_enabled": true,
|
||||
"java_script_enabled": true,
|
||||
"ip_address": "127.0.0.1"
|
||||
},
|
||||
"shipping": {
|
||||
"address": {
|
||||
"line1": "1467",
|
||||
"line2": "Harrison Street",
|
||||
"line3": "Harrison Street",
|
||||
"city": "San Fransico",
|
||||
"state": "California",
|
||||
"zip": "94122",
|
||||
"country": "DE",
|
||||
"first_name": "John",
|
||||
"last_name": "Doe"
|
||||
}
|
||||
},
|
||||
"statement_descriptor_name": "joseph",
|
||||
"statement_descriptor_suffix": "JS",
|
||||
"metadata": {
|
||||
"udf1": "value1",
|
||||
"new_customer": "true",
|
||||
"login_date": "2019-09-10T10:11:12Z"
|
||||
}
|
||||
}
|
||||
},
|
||||
"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"
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user