mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 09:07:09 +08:00
refactor(test_utils): use json to run collection and add run time edit (#3807)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
21
Cargo.lock
generated
21
Cargo.lock
generated
@ -4977,14 +4977,14 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "regex"
|
name = "regex"
|
||||||
version = "1.9.6"
|
version = "1.10.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "ebee201405406dbf528b8b672104ae6d6d63e6d118cb10e4d51abbc7b58044ff"
|
checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aho-corasick",
|
"aho-corasick",
|
||||||
"memchr",
|
"memchr",
|
||||||
"regex-automata 0.3.9",
|
"regex-automata 0.4.5",
|
||||||
"regex-syntax 0.7.5",
|
"regex-syntax 0.8.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -4998,13 +4998,13 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "regex-automata"
|
name = "regex-automata"
|
||||||
version = "0.3.9"
|
version = "0.4.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "59b23e92ee4318893fa3fe3e6fb365258efbfe6ac6ab30f090cdcbb7aa37efa9"
|
checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aho-corasick",
|
"aho-corasick",
|
||||||
"memchr",
|
"memchr",
|
||||||
"regex-syntax 0.7.5",
|
"regex-syntax 0.8.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -5031,6 +5031,12 @@ version = "0.7.5"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da"
|
checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "regex-syntax"
|
||||||
|
version = "0.8.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rend"
|
name = "rend"
|
||||||
version = "0.4.1"
|
version = "0.4.1"
|
||||||
@ -6356,6 +6362,7 @@ dependencies = [
|
|||||||
"clap",
|
"clap",
|
||||||
"masking",
|
"masking",
|
||||||
"rand 0.8.5",
|
"rand 0.8.5",
|
||||||
|
"regex",
|
||||||
"reqwest",
|
"reqwest",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
|
|||||||
@ -17,6 +17,7 @@ async-trait = "0.1.68"
|
|||||||
base64 = "0.21.2"
|
base64 = "0.21.2"
|
||||||
clap = { version = "4.3.2", default-features = false, features = ["std", "derive", "help", "usage"] }
|
clap = { version = "4.3.2", default-features = false, features = ["std", "derive", "help", "usage"] }
|
||||||
rand = "0.8.5"
|
rand = "0.8.5"
|
||||||
|
regex = "1.10.3"
|
||||||
reqwest = { version = "0.11.18", features = ["native-tls"] }
|
reqwest = { version = "0.11.18", features = ["native-tls"] }
|
||||||
serde = { version = "1.0.193", features = ["derive"] }
|
serde = { version = "1.0.193", features = ["derive"] }
|
||||||
serde_json = "1.0.108"
|
serde_json = "1.0.108"
|
||||||
|
|||||||
@ -16,20 +16,13 @@ fn main() {
|
|||||||
};
|
};
|
||||||
let status = child.wait();
|
let status = child.wait();
|
||||||
|
|
||||||
if runner.file_modified_flag {
|
// Filter out None values leaving behind Some(Path)
|
||||||
let git_status = Command::new("git")
|
let paths: Vec<String> = runner.modified_file_paths.into_iter().flatten().collect();
|
||||||
.args([
|
let git_status = Command::new("git").arg("restore").args(&paths).output();
|
||||||
"restore",
|
|
||||||
format!("{}/event.prerequest.js", runner.collection_path).as_str(),
|
|
||||||
])
|
|
||||||
.output();
|
|
||||||
|
|
||||||
match git_status {
|
match git_status {
|
||||||
Ok(output) => {
|
Ok(output) => {
|
||||||
if output.status.success() {
|
if !output.status.success() {
|
||||||
let stdout_str = String::from_utf8_lossy(&output.stdout);
|
|
||||||
println!("Git command executed successfully: {stdout_str}");
|
|
||||||
} else {
|
|
||||||
let stderr_str = String::from_utf8_lossy(&output.stderr);
|
let stderr_str = String::from_utf8_lossy(&output.stderr);
|
||||||
eprintln!("Git command failed with error: {stderr_str}");
|
eprintln!("Git command failed with error: {stderr_str}");
|
||||||
}
|
}
|
||||||
@ -38,7 +31,6 @@ fn main() {
|
|||||||
eprintln!("Error running Git: {e}");
|
eprintln!("Error running Git: {e}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
let exit_code = match status {
|
let exit_code = match status {
|
||||||
Ok(exit_status) => {
|
Ok(exit_status) => {
|
||||||
|
|||||||
@ -1,7 +1,14 @@
|
|||||||
use std::{env, io::Write, path::Path, process::Command};
|
use std::{
|
||||||
|
env,
|
||||||
|
fs::{self, OpenOptions},
|
||||||
|
io::{self, Write},
|
||||||
|
path::Path,
|
||||||
|
process::{exit, Command},
|
||||||
|
};
|
||||||
|
|
||||||
use clap::{arg, command, Parser};
|
use clap::{arg, command, Parser};
|
||||||
use masking::PeekInterface;
|
use masking::PeekInterface;
|
||||||
|
use regex::Regex;
|
||||||
|
|
||||||
use crate::connector_auth::{ConnectorAuthType, ConnectorAuthenticationMap};
|
use crate::connector_auth::{ConnectorAuthType, ConnectorAuthenticationMap};
|
||||||
#[derive(Parser)]
|
#[derive(Parser)]
|
||||||
@ -33,14 +40,24 @@ struct Args {
|
|||||||
|
|
||||||
pub struct ReturnArgs {
|
pub struct ReturnArgs {
|
||||||
pub newman_command: Command,
|
pub newman_command: Command,
|
||||||
pub file_modified_flag: bool,
|
pub modified_file_paths: Vec<Option<String>>,
|
||||||
pub collection_path: String,
|
pub collection_path: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Just by the name of the connector, this function generates the name of the collection dir
|
// Generates the name of the collection JSON file for the specified connector.
|
||||||
|
// Example: CONNECTOR_NAME="stripe" -> OUTPUT: postman/collection-json/stripe.postman_collection.json
|
||||||
|
#[inline]
|
||||||
|
fn get_collection_path(name: impl AsRef<str>) -> String {
|
||||||
|
format!(
|
||||||
|
"postman/collection-json/{}.postman_collection.json",
|
||||||
|
name.as_ref()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Generates the name of the collection directory for the specified connector.
|
||||||
// Example: CONNECTOR_NAME="stripe" -> OUTPUT: postman/collection-dir/stripe
|
// Example: CONNECTOR_NAME="stripe" -> OUTPUT: postman/collection-dir/stripe
|
||||||
#[inline]
|
#[inline]
|
||||||
fn get_path(name: impl AsRef<str>) -> String {
|
fn get_dir_path(name: impl AsRef<str>) -> String {
|
||||||
format!("postman/collection-dir/{}", name.as_ref())
|
format!("postman/collection-dir/{}", name.as_ref())
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,22 +89,34 @@ pub fn generate_newman_command() -> ReturnArgs {
|
|||||||
let base_url = args.base_url;
|
let base_url = args.base_url;
|
||||||
let admin_api_key = args.admin_api_key;
|
let admin_api_key = args.admin_api_key;
|
||||||
|
|
||||||
let collection_path = get_path(&connector_name);
|
let collection_path = get_collection_path(&connector_name);
|
||||||
|
let collection_dir_path = get_dir_path(&connector_name);
|
||||||
let auth_map = ConnectorAuthenticationMap::new();
|
let auth_map = ConnectorAuthenticationMap::new();
|
||||||
|
|
||||||
let inner_map = auth_map.inner();
|
let inner_map = auth_map.inner();
|
||||||
|
|
||||||
// Newman runner
|
/*
|
||||||
// Depending on the conditions satisfied, variables are added. Since certificates of stripe have already
|
Newman runner
|
||||||
// been added to the postman collection, those conditions are set to true and collections that have
|
Certificate keys are added through secrets in CI, so there's no need to explicitly pass it as arguments.
|
||||||
// variables set up for certificate, will consider those variables and will fail.
|
It can be overridden by explicitly passing certificates as arguments.
|
||||||
|
|
||||||
|
If the collection requires certificates (Stripe collection for example) during the merchant connector account create step,
|
||||||
|
then Stripe's certificates will be passed implicitly (for now).
|
||||||
|
If any other connector requires certificates to be passed, that has to be passed explicitly for now.
|
||||||
|
*/
|
||||||
|
|
||||||
let mut newman_command = Command::new("newman");
|
let mut newman_command = Command::new("newman");
|
||||||
newman_command.args(["dir-run", &collection_path]);
|
newman_command.args(["run", &collection_path]);
|
||||||
newman_command.args(["--env-var", &format!("admin_api_key={admin_api_key}")]);
|
newman_command.args(["--env-var", &format!("admin_api_key={admin_api_key}")]);
|
||||||
newman_command.args(["--env-var", &format!("baseUrl={base_url}")]);
|
newman_command.args(["--env-var", &format!("baseUrl={base_url}")]);
|
||||||
|
|
||||||
if let Some(auth_type) = inner_map.get(&connector_name) {
|
let custom_header_exist = check_for_custom_headers(args.custom_headers, &collection_dir_path);
|
||||||
|
|
||||||
|
// validation of connector is needed here as a work around to the limitation of the fork of newman that Hyperswitch uses
|
||||||
|
let (connector_name, modified_collection_file_paths) =
|
||||||
|
check_connector_for_dynamic_amount(&connector_name);
|
||||||
|
|
||||||
|
if let Some(auth_type) = inner_map.get(connector_name) {
|
||||||
match auth_type {
|
match auth_type {
|
||||||
ConnectorAuthType::HeaderKey { api_key } => {
|
ConnectorAuthType::HeaderKey { api_key } => {
|
||||||
newman_command.args([
|
newman_command.args([
|
||||||
@ -187,24 +216,126 @@ pub fn generate_newman_command() -> ReturnArgs {
|
|||||||
newman_command.arg("--verbose");
|
newman_command.arg("--verbose");
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut modified = false;
|
ReturnArgs {
|
||||||
if let Some(headers) = &args.custom_headers {
|
newman_command,
|
||||||
|
modified_file_paths: vec![modified_collection_file_paths, custom_header_exist],
|
||||||
|
collection_path,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn check_for_custom_headers(headers: Option<Vec<String>>, path: &str) -> Option<String> {
|
||||||
|
if let Some(headers) = &headers {
|
||||||
for header in headers {
|
for header in headers {
|
||||||
if let Some((key, value)) = header.split_once(':') {
|
if let Some((key, value)) = header.split_once(':') {
|
||||||
let content_to_insert =
|
let content_to_insert =
|
||||||
format!(r#"pm.request.headers.add({{key: "{key}", value: "{value}"}});"#);
|
format!(r#"pm.request.headers.add({{key: "{key}", value: "{value}"}});"#);
|
||||||
if insert_content(&collection_path, &content_to_insert).is_ok() {
|
|
||||||
modified = true;
|
if let Err(err) = insert_content(path, &content_to_insert) {
|
||||||
|
eprintln!("An error occurred while inserting the custom header: {err}");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
eprintln!("Invalid header format: {}", header);
|
eprintln!("Invalid header format: {}", header);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return Some(format!("{}/event.prerequest.js", path));
|
||||||
|
}
|
||||||
|
None
|
||||||
|
}
|
||||||
|
|
||||||
|
// If the connector name exists in dynamic_amount_connectors,
|
||||||
|
// the corresponding collection is modified at runtime to remove double quotes
|
||||||
|
pub fn check_connector_for_dynamic_amount(connector_name: &str) -> (&str, Option<String>) {
|
||||||
|
let collection_dir_path = get_dir_path(connector_name);
|
||||||
|
|
||||||
|
let dynamic_amount_connectors = ["nmi", "powertranz"];
|
||||||
|
|
||||||
|
if dynamic_amount_connectors.contains(&connector_name) {
|
||||||
|
return remove_quotes_for_integer_values(connector_name).unwrap_or((connector_name, None));
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
If connector name does not exist in dynamic_amount_connectors but we want to run it with custom headers,
|
||||||
|
since we're running from collections directly, we'll have to export the collection again and it is much simpler.
|
||||||
|
We could directly inject the custom-headers using regex, but it is not encouraged as it is hard
|
||||||
|
to determine the place of edit.
|
||||||
|
*/
|
||||||
|
export_collection(connector_name, collection_dir_path);
|
||||||
|
|
||||||
|
(connector_name, None)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Existing issue with the fork of newman is that, it requires you to pass variables like `{{value}}` within
|
||||||
|
double quotes without which it fails to execute.
|
||||||
|
For integer values like `amount`, this is a bummer as it flags the value stating it is of type
|
||||||
|
string and not integer.
|
||||||
|
Refactoring is done in 2 steps:
|
||||||
|
- Export the collection to json (although the json will be up-to-date, we export it again for safety)
|
||||||
|
- Use regex to replace the values which removes double quotes from integer values
|
||||||
|
Ex: \"{{amount}}\" -> {{amount}}
|
||||||
|
*/
|
||||||
|
|
||||||
|
pub fn remove_quotes_for_integer_values(
|
||||||
|
connector_name: &str,
|
||||||
|
) -> Result<(&str, Option<String>), io::Error> {
|
||||||
|
let collection_path = get_collection_path(connector_name);
|
||||||
|
let collection_dir_path = get_dir_path(connector_name);
|
||||||
|
|
||||||
|
let values_to_replace = [
|
||||||
|
"amount",
|
||||||
|
"another_random_number",
|
||||||
|
"capture_amount",
|
||||||
|
"random_number",
|
||||||
|
"refund_amount",
|
||||||
|
];
|
||||||
|
|
||||||
|
export_collection(connector_name, collection_dir_path);
|
||||||
|
|
||||||
|
let mut contents = fs::read_to_string(&collection_path)?;
|
||||||
|
for value_to_replace in values_to_replace {
|
||||||
|
if let Ok(re) = Regex::new(&format!(
|
||||||
|
r#"\\"(?P<field>\{{\{{{}\}}\}})\\""#,
|
||||||
|
value_to_replace
|
||||||
|
)) {
|
||||||
|
contents = re.replace_all(&contents, "$field").to_string();
|
||||||
|
} else {
|
||||||
|
eprintln!("Regex validation failed.");
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnArgs {
|
let mut file = OpenOptions::new()
|
||||||
newman_command,
|
.write(true)
|
||||||
file_modified_flag: modified,
|
.truncate(true)
|
||||||
collection_path,
|
.open(&collection_path)?;
|
||||||
|
|
||||||
|
file.write_all(contents.as_bytes())?;
|
||||||
|
}
|
||||||
|
|
||||||
|
Ok((connector_name, Some(collection_path)))
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn export_collection(connector_name: &str, collection_dir_path: String) {
|
||||||
|
let collection_path = get_collection_path(connector_name);
|
||||||
|
|
||||||
|
let mut newman_command = Command::new("newman");
|
||||||
|
newman_command.args([
|
||||||
|
"dir-import".to_owned(),
|
||||||
|
collection_dir_path,
|
||||||
|
"-o".to_owned(),
|
||||||
|
collection_path.clone(),
|
||||||
|
]);
|
||||||
|
|
||||||
|
match newman_command.spawn().and_then(|mut child| child.wait()) {
|
||||||
|
Ok(exit_status) => {
|
||||||
|
if exit_status.success() {
|
||||||
|
println!("Conversion of collection from directory structure to json successful!");
|
||||||
|
} else {
|
||||||
|
eprintln!("Conversion of collection from directory structure to json failed!");
|
||||||
|
exit(exit_status.code().unwrap_or(1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Err(err) => {
|
||||||
|
eprintln!("Failed to execute dir-import: {:?}", err);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,13 +1,6 @@
|
|||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"header": [
|
"header": [],
|
||||||
{
|
|
||||||
"key": "x-feature",
|
|
||||||
"value": "router-custom",
|
|
||||||
"type": "text",
|
|
||||||
"disabled": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/health",
|
"raw": "{{baseUrl}}/health",
|
||||||
"host": ["{{baseUrl}}"],
|
"host": ["{{baseUrl}}"],
|
||||||
|
|||||||
@ -1,13 +1,6 @@
|
|||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"header": [
|
"header": [],
|
||||||
{
|
|
||||||
"key": "x-feature",
|
|
||||||
"value": "router-custom",
|
|
||||||
"type": "text",
|
|
||||||
"disabled": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/health",
|
"raw": "{{baseUrl}}/health",
|
||||||
"host": ["{{baseUrl}}"],
|
"host": ["{{baseUrl}}"],
|
||||||
|
|||||||
@ -1,13 +1,6 @@
|
|||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"header": [
|
"header": [],
|
||||||
{
|
|
||||||
"key": "x-feature",
|
|
||||||
"value": "router-custom",
|
|
||||||
"type": "text",
|
|
||||||
"disabled": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/health",
|
"raw": "{{baseUrl}}/health",
|
||||||
"host": ["{{baseUrl}}"],
|
"host": ["{{baseUrl}}"],
|
||||||
|
|||||||
@ -1,13 +1,6 @@
|
|||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"header": [
|
"header": [],
|
||||||
{
|
|
||||||
"key": "x-feature",
|
|
||||||
"value": "router-custom",
|
|
||||||
"type": "text",
|
|
||||||
"disabled": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/health",
|
"raw": "{{baseUrl}}/health",
|
||||||
"host": ["{{baseUrl}}"],
|
"host": ["{{baseUrl}}"],
|
||||||
|
|||||||
@ -1,13 +1,6 @@
|
|||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"header": [
|
"header": [],
|
||||||
{
|
|
||||||
"key": "x-feature",
|
|
||||||
"value": "router-custom",
|
|
||||||
"type": "text",
|
|
||||||
"disabled": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/health",
|
"raw": "{{baseUrl}}/health",
|
||||||
"host": ["{{baseUrl}}"],
|
"host": ["{{baseUrl}}"],
|
||||||
|
|||||||
@ -1,13 +1,6 @@
|
|||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"header": [
|
"header": [],
|
||||||
{
|
|
||||||
"key": "x-feature",
|
|
||||||
"value": "router-custom",
|
|
||||||
"type": "text",
|
|
||||||
"disabled": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/health",
|
"raw": "{{baseUrl}}/health",
|
||||||
"host": ["{{baseUrl}}"],
|
"host": ["{{baseUrl}}"],
|
||||||
|
|||||||
@ -1,20 +1,9 @@
|
|||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"header": [
|
"header": [],
|
||||||
{
|
|
||||||
"key": "x-feature",
|
|
||||||
"value": "router-custom",
|
|
||||||
"type": "text",
|
|
||||||
"disabled": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/health",
|
"raw": "{{baseUrl}}/health",
|
||||||
"host": [
|
"host": ["{{baseUrl}}"],
|
||||||
"{{baseUrl}}"
|
"path": ["health"]
|
||||||
],
|
|
||||||
"path": [
|
|
||||||
"health"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,13 +1,6 @@
|
|||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"header": [
|
"header": [],
|
||||||
{
|
|
||||||
"key": "x-feature",
|
|
||||||
"value": "router-custom",
|
|
||||||
"type": "text",
|
|
||||||
"disabled": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/health",
|
"raw": "{{baseUrl}}/health",
|
||||||
"host": ["{{baseUrl}}"],
|
"host": ["{{baseUrl}}"],
|
||||||
|
|||||||
@ -1,13 +1,6 @@
|
|||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"header": [
|
"header": [],
|
||||||
{
|
|
||||||
"key": "x-feature",
|
|
||||||
"value": "router-custom",
|
|
||||||
"type": "text",
|
|
||||||
"disabled": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/health",
|
"raw": "{{baseUrl}}/health",
|
||||||
"host": ["{{baseUrl}}"],
|
"host": ["{{baseUrl}}"],
|
||||||
|
|||||||
@ -1,20 +1,9 @@
|
|||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"header": [
|
"header": [],
|
||||||
{
|
|
||||||
"key": "x-feature",
|
|
||||||
"value": "router-custom",
|
|
||||||
"type": "text",
|
|
||||||
"disabled": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/health",
|
"raw": "{{baseUrl}}/health",
|
||||||
"host": [
|
"host": ["{{baseUrl}}"],
|
||||||
"{{baseUrl}}"
|
"path": ["health"]
|
||||||
],
|
|
||||||
"path": [
|
|
||||||
"health"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,13 +1,6 @@
|
|||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"header": [
|
"header": [],
|
||||||
{
|
|
||||||
"key": "x-feature",
|
|
||||||
"value": "router-custom",
|
|
||||||
"type": "text",
|
|
||||||
"disabled": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/health",
|
"raw": "{{baseUrl}}/health",
|
||||||
"host": ["{{baseUrl}}"],
|
"host": ["{{baseUrl}}"],
|
||||||
|
|||||||
@ -1,13 +1,6 @@
|
|||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"header": [
|
"header": [],
|
||||||
{
|
|
||||||
"key": "x-feature",
|
|
||||||
"value": "router-custom",
|
|
||||||
"type": "text",
|
|
||||||
"disabled": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/health",
|
"raw": "{{baseUrl}}/health",
|
||||||
"host": ["{{baseUrl}}"],
|
"host": ["{{baseUrl}}"],
|
||||||
|
|||||||
@ -1,13 +1,6 @@
|
|||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"header": [
|
"header": [],
|
||||||
{
|
|
||||||
"key": "x-feature",
|
|
||||||
"value": "router-custom",
|
|
||||||
"type": "text",
|
|
||||||
"disabled": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/health",
|
"raw": "{{baseUrl}}/health",
|
||||||
"host": ["{{baseUrl}}"],
|
"host": ["{{baseUrl}}"],
|
||||||
|
|||||||
@ -1,13 +1,6 @@
|
|||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"header": [
|
"header": [],
|
||||||
{
|
|
||||||
"key": "x-feature",
|
|
||||||
"value": "router-custom",
|
|
||||||
"type": "text",
|
|
||||||
"disabled": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/health",
|
"raw": "{{baseUrl}}/health",
|
||||||
"host": ["{{baseUrl}}"],
|
"host": ["{{baseUrl}}"],
|
||||||
|
|||||||
@ -1,13 +1,6 @@
|
|||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"header": [
|
"header": [],
|
||||||
{
|
|
||||||
"key": "x-feature",
|
|
||||||
"value": "router-custom",
|
|
||||||
"type": "text",
|
|
||||||
"disabled": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/health",
|
"raw": "{{baseUrl}}/health",
|
||||||
"host": ["{{baseUrl}}"],
|
"host": ["{{baseUrl}}"],
|
||||||
|
|||||||
@ -1,13 +1,6 @@
|
|||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"header": [
|
"header": [],
|
||||||
{
|
|
||||||
"key": "x-feature",
|
|
||||||
"value": "router-custom",
|
|
||||||
"type": "text",
|
|
||||||
"disabled": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/health",
|
"raw": "{{baseUrl}}/health",
|
||||||
"host": ["{{baseUrl}}"],
|
"host": ["{{baseUrl}}"],
|
||||||
|
|||||||
@ -29,12 +29,7 @@
|
|||||||
"key": "Accept",
|
"key": "Accept",
|
||||||
"value": "application/json"
|
"value": "application/json"
|
||||||
},
|
},
|
||||||
{
|
,
|
||||||
"key": "x-feature",
|
|
||||||
"value": "router-custom",
|
|
||||||
"type": "text",
|
|
||||||
"disabled": true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"key": "publishable_key",
|
"key": "publishable_key",
|
||||||
"value": "",
|
"value": "",
|
||||||
@ -79,14 +74,8 @@
|
|||||||
},
|
},
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/payments/:id/confirm",
|
"raw": "{{baseUrl}}/payments/:id/confirm",
|
||||||
"host": [
|
"host": ["{{baseUrl}}"],
|
||||||
"{{baseUrl}}"
|
"path": ["payments", ":id", "confirm"],
|
||||||
],
|
|
||||||
"path": [
|
|
||||||
"payments",
|
|
||||||
":id",
|
|
||||||
"confirm"
|
|
||||||
],
|
|
||||||
"variable": [
|
"variable": [
|
||||||
{
|
{
|
||||||
"key": "id",
|
"key": "id",
|
||||||
|
|||||||
@ -18,18 +18,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"raw_json_formatted": {
|
"raw_json_formatted": {
|
||||||
"amount": "{{another_random_number}}"
|
"amount": "{{another_random_number}}",
|
||||||
|
"amount_to_capture": "{{another_random_number}}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/payments/:id",
|
"raw": "{{baseUrl}}/payments/:id",
|
||||||
"host": [
|
"host": ["{{baseUrl}}"],
|
||||||
"{{baseUrl}}"
|
"path": ["payments", ":id"],
|
||||||
],
|
|
||||||
"path": [
|
|
||||||
"payments",
|
|
||||||
":id"
|
|
||||||
],
|
|
||||||
"variable": [
|
"variable": [
|
||||||
{
|
{
|
||||||
"key": "id",
|
"key": "id",
|
||||||
|
|||||||
@ -29,12 +29,7 @@
|
|||||||
"key": "Accept",
|
"key": "Accept",
|
||||||
"value": "application/json"
|
"value": "application/json"
|
||||||
},
|
},
|
||||||
{
|
,
|
||||||
"key": "x-feature",
|
|
||||||
"value": "router-custom",
|
|
||||||
"type": "text",
|
|
||||||
"disabled": true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"key": "publishable_key",
|
"key": "publishable_key",
|
||||||
"value": "",
|
"value": "",
|
||||||
@ -79,14 +74,8 @@
|
|||||||
},
|
},
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/payments/:id/confirm",
|
"raw": "{{baseUrl}}/payments/:id/confirm",
|
||||||
"host": [
|
"host": ["{{baseUrl}}"],
|
||||||
"{{baseUrl}}"
|
"path": ["payments", ":id", "confirm"],
|
||||||
],
|
|
||||||
"path": [
|
|
||||||
"payments",
|
|
||||||
":id",
|
|
||||||
"confirm"
|
|
||||||
],
|
|
||||||
"variable": [
|
"variable": [
|
||||||
{
|
{
|
||||||
"key": "id",
|
"key": "id",
|
||||||
|
|||||||
@ -18,18 +18,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"raw_json_formatted": {
|
"raw_json_formatted": {
|
||||||
"amount": "{{another_random_number}}"
|
"amount": "{{another_random_number}}",
|
||||||
|
"amount_to_capture": "{{another_random_number}}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/payments/:id",
|
"raw": "{{baseUrl}}/payments/:id",
|
||||||
"host": [
|
"host": ["{{baseUrl}}"],
|
||||||
"{{baseUrl}}"
|
"path": ["payments", ":id"],
|
||||||
],
|
|
||||||
"path": [
|
|
||||||
"payments",
|
|
||||||
":id"
|
|
||||||
],
|
|
||||||
"variable": [
|
"variable": [
|
||||||
{
|
{
|
||||||
"key": "id",
|
"key": "id",
|
||||||
|
|||||||
@ -1,20 +1,9 @@
|
|||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"header": [
|
"header": [],
|
||||||
{
|
|
||||||
"key": "x-feature",
|
|
||||||
"value": "router-custom",
|
|
||||||
"type": "text",
|
|
||||||
"disabled": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/health",
|
"raw": "{{baseUrl}}/health",
|
||||||
"host": [
|
"host": ["{{baseUrl}}"],
|
||||||
"{{baseUrl}}"
|
"path": ["health"]
|
||||||
],
|
|
||||||
"path": [
|
|
||||||
"health"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,13 +1,6 @@
|
|||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"header": [
|
"header": [],
|
||||||
{
|
|
||||||
"key": "x-feature",
|
|
||||||
"value": "router-custom",
|
|
||||||
"type": "text",
|
|
||||||
"disabled": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/health",
|
"raw": "{{baseUrl}}/health",
|
||||||
"host": ["{{baseUrl}}"],
|
"host": ["{{baseUrl}}"],
|
||||||
|
|||||||
@ -1,13 +1,6 @@
|
|||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"header": [
|
"header": [],
|
||||||
{
|
|
||||||
"key": "x-feature",
|
|
||||||
"value": "router-custom",
|
|
||||||
"type": "text",
|
|
||||||
"disabled": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/health",
|
"raw": "{{baseUrl}}/health",
|
||||||
"host": ["{{baseUrl}}"],
|
"host": ["{{baseUrl}}"],
|
||||||
|
|||||||
@ -1,13 +1,6 @@
|
|||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"header": [
|
"header": [],
|
||||||
{
|
|
||||||
"key": "x-feature",
|
|
||||||
"value": "router-custom",
|
|
||||||
"type": "text",
|
|
||||||
"disabled": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/health",
|
"raw": "{{baseUrl}}/health",
|
||||||
"host": ["{{baseUrl}}"],
|
"host": ["{{baseUrl}}"],
|
||||||
|
|||||||
@ -1,13 +1,6 @@
|
|||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"header": [
|
"header": [],
|
||||||
{
|
|
||||||
"key": "x-feature",
|
|
||||||
"value": "router-custom",
|
|
||||||
"type": "text",
|
|
||||||
"disabled": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/health",
|
"raw": "{{baseUrl}}/health",
|
||||||
"host": ["{{baseUrl}}"],
|
"host": ["{{baseUrl}}"],
|
||||||
|
|||||||
@ -1,13 +1,6 @@
|
|||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"header": [
|
"header": [],
|
||||||
{
|
|
||||||
"key": "x-feature",
|
|
||||||
"value": "router-custom",
|
|
||||||
"type": "text",
|
|
||||||
"disabled": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/health",
|
"raw": "{{baseUrl}}/health",
|
||||||
"host": ["{{baseUrl}}"],
|
"host": ["{{baseUrl}}"],
|
||||||
|
|||||||
@ -24,23 +24,12 @@
|
|||||||
{
|
{
|
||||||
"key": "Accept",
|
"key": "Accept",
|
||||||
"value": "application/json"
|
"value": "application/json"
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "x-feature",
|
|
||||||
"value": "router-custom",
|
|
||||||
"type": "text",
|
|
||||||
"disabled": true
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/account/payment_methods?client_secret={{client_secret}}",
|
"raw": "{{baseUrl}}/account/payment_methods?client_secret={{client_secret}}",
|
||||||
"host": [
|
"host": ["{{baseUrl}}"],
|
||||||
"{{baseUrl}}"
|
"path": ["account", "payment_methods"],
|
||||||
],
|
|
||||||
"path": [
|
|
||||||
"account",
|
|
||||||
"payment_methods"
|
|
||||||
],
|
|
||||||
"query": [
|
"query": [
|
||||||
{
|
{
|
||||||
"key": "client_secret",
|
"key": "client_secret",
|
||||||
|
|||||||
@ -24,23 +24,12 @@
|
|||||||
{
|
{
|
||||||
"key": "Accept",
|
"key": "Accept",
|
||||||
"value": "application/json"
|
"value": "application/json"
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "x-feature",
|
|
||||||
"value": "router-custom",
|
|
||||||
"type": "text",
|
|
||||||
"disabled": true
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/account/payment_methods?client_secret={{client_secret}}",
|
"raw": "{{baseUrl}}/account/payment_methods?client_secret={{client_secret}}",
|
||||||
"host": [
|
"host": ["{{baseUrl}}"],
|
||||||
"{{baseUrl}}"
|
"path": ["account", "payment_methods"],
|
||||||
],
|
|
||||||
"path": [
|
|
||||||
"account",
|
|
||||||
"payment_methods"
|
|
||||||
],
|
|
||||||
"query": [
|
"query": [
|
||||||
{
|
{
|
||||||
"key": "client_secret",
|
"key": "client_secret",
|
||||||
|
|||||||
@ -29,12 +29,7 @@
|
|||||||
"key": "Accept",
|
"key": "Accept",
|
||||||
"value": "application/json"
|
"value": "application/json"
|
||||||
},
|
},
|
||||||
{
|
,
|
||||||
"key": "x-feature",
|
|
||||||
"value": "router-custom",
|
|
||||||
"type": "text",
|
|
||||||
"disabled": true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"key": "publishable_key",
|
"key": "publishable_key",
|
||||||
"value": "",
|
"value": "",
|
||||||
|
|||||||
@ -1,13 +1,6 @@
|
|||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"header": [
|
"header": [],
|
||||||
{
|
|
||||||
"key": "x-feature",
|
|
||||||
"value": "router-custom",
|
|
||||||
"type": "text",
|
|
||||||
"disabled": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/health",
|
"raw": "{{baseUrl}}/health",
|
||||||
"host": ["{{baseUrl}}"],
|
"host": ["{{baseUrl}}"],
|
||||||
|
|||||||
@ -1,13 +1,6 @@
|
|||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"header": [
|
"header": [],
|
||||||
{
|
|
||||||
"key": "x-feature",
|
|
||||||
"value": "router-custom",
|
|
||||||
"type": "text",
|
|
||||||
"disabled": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/health",
|
"raw": "{{baseUrl}}/health",
|
||||||
"host": ["{{baseUrl}}"],
|
"host": ["{{baseUrl}}"],
|
||||||
|
|||||||
@ -1,20 +1,9 @@
|
|||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"header": [
|
"header": [],
|
||||||
{
|
|
||||||
"key": "x-feature",
|
|
||||||
"value": "router-custom",
|
|
||||||
"type": "text",
|
|
||||||
"disabled": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/health",
|
"raw": "{{baseUrl}}/health",
|
||||||
"host": [
|
"host": ["{{baseUrl}}"],
|
||||||
"{{baseUrl}}"
|
"path": ["health"]
|
||||||
],
|
|
||||||
"path": [
|
|
||||||
"health"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,13 +1,6 @@
|
|||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"header": [
|
"header": [],
|
||||||
{
|
|
||||||
"key": "x-feature",
|
|
||||||
"value": "router-custom",
|
|
||||||
"type": "text",
|
|
||||||
"disabled": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/health",
|
"raw": "{{baseUrl}}/health",
|
||||||
"host": ["{{baseUrl}}"],
|
"host": ["{{baseUrl}}"],
|
||||||
|
|||||||
@ -1,13 +1,6 @@
|
|||||||
{
|
{
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"header": [
|
"header": [],
|
||||||
{
|
|
||||||
"key": "x-feature",
|
|
||||||
"value": "router-custom",
|
|
||||||
"type": "text",
|
|
||||||
"disabled": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/health",
|
"raw": "{{baseUrl}}/health",
|
||||||
"host": ["{{baseUrl}}"],
|
"host": ["{{baseUrl}}"],
|
||||||
|
|||||||
@ -3,14 +3,7 @@
|
|||||||
"type": "noauth"
|
"type": "noauth"
|
||||||
},
|
},
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"header": [
|
"header": [],
|
||||||
{
|
|
||||||
"key": "x-feature",
|
|
||||||
"value": "router-custom",
|
|
||||||
"type": "text",
|
|
||||||
"disabled": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/health",
|
"raw": "{{baseUrl}}/health",
|
||||||
"host": ["{{baseUrl}}"],
|
"host": ["{{baseUrl}}"],
|
||||||
|
|||||||
Reference in New Issue
Block a user