Skip to content

Commit f3677f2

Browse files
refactor(payment_methods): List the Payment Methods for Merchant , based on the connector type (#4909)
Co-authored-by: Narayan Bhat <[email protected]>
1 parent 37e34e3 commit f3677f2

File tree

73 files changed

+2712
-8691
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+2712
-8691
lines changed

Cargo.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/router/src/core/payments/helpers.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,10 @@ pub fn filter_mca_based_on_business_profile(
123123
if let Some(profile_id) = profile_id {
124124
merchant_connector_accounts
125125
.into_iter()
126-
.filter(|mca| mca.profile_id.as_ref() == Some(&profile_id))
126+
.filter(|mca| {
127+
mca.profile_id.as_ref() == Some(&profile_id)
128+
&& mca.connector_type == ConnectorType::PaymentProcessor
129+
})
127130
.collect::<Vec<_>>()
128131
} else {
129132
merchant_connector_accounts

postman/collection-dir/aci/Flow Testcases/QuickStart/Payment Connector - Create/request.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
}
3939
},
4040
"raw_json_formatted": {
41-
"connector_type": "fiz_operations",
41+
"connector_type": "payment_processor",
4242
"connector_name": "aci",
4343
"connector_account_details": {
4444
"auth_type": "BodyKey",

postman/collection-dir/adyen_uk/Flow Testcases/QuickStart/Payment Connector - Create/request.json

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
}
3939
},
4040
"raw_json_formatted": {
41-
"connector_type": "fiz_operations",
41+
"connector_type": "payment_processor",
4242
"connector_name": "adyen",
4343
"connector_account_details": {
4444
"auth_type": "BodyKey",
@@ -313,10 +313,7 @@
313313
{
314314
"type": "CARD",
315315
"parameters": {
316-
"allowed_auth_methods": [
317-
"PAN_ONLY",
318-
"CRYPTOGRAM_3DS"
319-
],
316+
"allowed_auth_methods": ["PAN_ONLY", "CRYPTOGRAM_3DS"],
320317
"allowed_card_networks": [
321318
"AMEX",
322319
"DISCOVER",
@@ -340,14 +337,8 @@
340337
},
341338
"url": {
342339
"raw": "{{baseUrl}}/account/:account_id/connectors",
343-
"host": [
344-
"{{baseUrl}}"
345-
],
346-
"path": [
347-
"account",
348-
":account_id",
349-
"connectors"
350-
],
340+
"host": ["{{baseUrl}}"],
341+
"path": ["account", ":account_id", "connectors"],
351342
"variable": [
352343
{
353344
"key": "account_id",
@@ -357,4 +348,4 @@
357348
]
358349
},
359350
"description": "Create a new Payment Connector for the merchant account. The connector could be a payment processor / facilitator / acquirer or specialised services like Fraud / Accounting etc."
360-
}
351+
}

postman/collection-dir/airwallex/Flow Testcases/QuickStart/Payment Connector - Create/request.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
}
3939
},
4040
"raw_json_formatted": {
41-
"connector_type": "fiz_operations",
41+
"connector_type": "payment_processor",
4242
"connector_name": "airwallex",
4343
"connector_account_details": {
4444
"auth_type": "BodyKey",

postman/collection-dir/authorizedotnet/Flow Testcases/QuickStart/Payment Connector - Create/request.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
}
3939
},
4040
"raw_json_formatted": {
41-
"connector_type": "fiz_operations",
41+
"connector_type": "payment_processor",
4242
"connector_name": "authorizedotnet",
4343
"connector_account_details": {
4444
"auth_type": "BodyKey",

postman/collection-dir/authorizedotnet/Flow Testcases/Variation Cases/Scenario12-Failed case for wrong api keys/Payment Connector - Update/request.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
}
3939
},
4040
"raw_json_formatted": {
41-
"connector_type": "fiz_operations",
41+
"connector_type": "payment_processor",
4242
"connector_account_details": {
4343
"auth_type": "BodyKey",
4444
"api_key": "{{connector_api_key}}",
@@ -49,7 +49,7 @@
4949
"url": {
5050
"raw": "{{baseUrl}}/account/:account_id/connectors/:connector_id",
5151
"host": ["{{baseUrl}}"],
52-
"path": ["account", ":account_id", "connectors",":connector_id"],
52+
"path": ["account", ":account_id", "connectors", ":connector_id"],
5353
"variable": [
5454
{
5555
"key": "account_id",
@@ -61,7 +61,6 @@
6161
"value": "{{merchant_connector_id}}",
6262
"description": "(Required) The unique identifier for the merchant connector account"
6363
}
64-
6564
]
6665
},
6766
"description": "Create a new Payment Connector for the merchant account. The connector could be a payment processor / facilitator / acquirer or specialised services like Fraud / Accounting etc."

postman/collection-dir/bambora/Flow Testcases/QuickStart/Payment Connector - Create/request.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
}
3939
},
4040
"raw_json_formatted": {
41-
"connector_type": "fiz_operations",
41+
"connector_type": "payment_processor",
4242
"connector_name": "bambora",
4343
"connector_account_details": {
4444
"auth_type": "BodyKey",

postman/collection-dir/bambora_3ds/Flow Testcases/QuickStart/Payment Connector - Create/request.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
}
3939
},
4040
"raw_json_formatted": {
41-
"connector_type": "fiz_operations",
41+
"connector_type": "payment_processor",
4242
"connector_name": "bambora",
4343
"connector_account_details": {
4444
"auth_type": "BodyKey",

postman/collection-dir/bankofamerica/Flow Testcases/QuickStart/Payment Connector - Create/request.json

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
}
3939
},
4040
"raw_json_formatted": {
41-
"connector_type": "fiz_operations",
41+
"connector_type": "payment_processor",
4242
"connector_name": "bankofamerica",
4343
"business_country": "US",
4444
"business_label": "default",
@@ -57,21 +57,15 @@
5757
"payment_method_types": [
5858
{
5959
"payment_method_type": "credit",
60-
"card_networks": [
61-
"Visa",
62-
"Mastercard"
63-
],
60+
"card_networks": ["Visa", "Mastercard"],
6461
"minimum_amount": 1,
6562
"maximum_amount": 68607706,
6663
"recurring_enabled": true,
6764
"installment_payment_enabled": true
6865
},
6966
{
7067
"payment_method_type": "debit",
71-
"card_networks": [
72-
"Visa",
73-
"Mastercard"
74-
],
68+
"card_networks": ["Visa", "Mastercard"],
7569
"minimum_amount": 1,
7670
"maximum_amount": 68607706,
7771
"recurring_enabled": true,
@@ -88,14 +82,8 @@
8882
},
8983
"url": {
9084
"raw": "{{baseUrl}}/account/:account_id/connectors",
91-
"host": [
92-
"{{baseUrl}}"
93-
],
94-
"path": [
95-
"account",
96-
":account_id",
97-
"connectors"
98-
],
85+
"host": ["{{baseUrl}}"],
86+
"path": ["account", ":account_id", "connectors"],
9987
"variable": [
10088
{
10189
"key": "account_id",

0 commit comments

Comments
 (0)