Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(router): add endpoint for listing connector features #6612

Merged
merged 53 commits into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
35a6128
add payment method validation
AkshayaFoiger Nov 17, 2024
0e82f43
add /feature_matrix endpoint
AkshayaFoiger Nov 19, 2024
3a508bb
Merge branch 'main' into pm-details-doc
AkshayaFoiger Nov 19, 2024
81082ec
chore: run formatter
hyperswitch-bot[bot] Nov 19, 2024
fc46d91
add support for deutshebank
AkshayaFoiger Nov 20, 2024
9f1e4fe
chore: run formatter
hyperswitch-bot[bot] Nov 20, 2024
05a35be
add country and currency in pm details
AkshayaFoiger Dec 2, 2024
87aae38
refactor(router): add paymentMethod to validate_capture and resolve c…
AkshayaFoiger Dec 5, 2024
169285d
feat(configs): add bambora country and currency
AkshayaFoiger Dec 5, 2024
9ba4b17
feat(cypress): add a test case
AkshayaFoiger Dec 5, 2024
5f63fa1
Merge branch 'main' into pm-details-doc
AkshayaFoiger Dec 5, 2024
3298399
chore(cypress): run formatter and address lints
hyperswitch-bot[bot] Dec 5, 2024
f66bfb3
chore: run formatter
hyperswitch-bot[bot] Dec 5, 2024
616c7b6
Merge branch 'main' into pm-details-doc
AkshayaFoiger Dec 6, 2024
2c9663f
fix(router): resolve merge conflict
AkshayaFoiger Dec 6, 2024
f1ffeb8
fix(router): remove unnecessary qualification for enum
AkshayaFoiger Dec 6, 2024
a21d1c0
chore: run formatter
hyperswitch-bot[bot] Dec 6, 2024
d8e001a
feat(router): add ConnectorSpecifications trait
AkshayaFoiger Dec 8, 2024
c598713
refactor(cypress): resolve comment
AkshayaFoiger Dec 9, 2024
f075052
feat(openapi): add request and response struct to openapi
AkshayaFoiger Dec 9, 2024
454110f
refactor(router): change the type of supported_webhook_flows field
AkshayaFoiger Dec 9, 2024
3b500f6
Merge branch 'main' into pm-details-doc
AkshayaFoiger Dec 9, 2024
ca4e8d5
fix(router): merge conflicts
AkshayaFoiger Dec 9, 2024
bb26e3c
fix(router): fix formatting
AkshayaFoiger Dec 9, 2024
001754d
Merge branch 'main' into pm-details-doc
AkshayaFoiger Dec 9, 2024
9cf45c7
fix(clippy): remove ref from validation functions
AkshayaFoiger Dec 10, 2024
6ebe4c2
chore: run formatter
hyperswitch-bot[bot] Dec 10, 2024
8562f90
refactor(feature_matrix): rename fields and generate openapi_spec
AkshayaFoiger Dec 10, 2024
0c8421a
refactor(router): remove validate_capture_method from zsl
AkshayaFoiger Dec 10, 2024
7641750
fix(configs): remove CAD from pm_filters.bambora
AkshayaFoiger Dec 10, 2024
0f30c99
chore: fix clippy error
AkshayaFoiger Dec 12, 2024
2482e9e
Merge branch 'main' into pm-details-doc
AkshayaFoiger Dec 12, 2024
b84ef1b
fix(router): resolve merge conflicts
AkshayaFoiger Dec 12, 2024
27a302c
chore: run formatter
hyperswitch-bot[bot] Dec 12, 2024
9533913
Merge branch 'main' into pm-details-doc
AkshayaFoiger Dec 13, 2024
c1f050d
chore: fix open_sepc error
AkshayaFoiger Dec 13, 2024
b4394de
Merge branch 'main' into pm-details-doc
AkshayaFoiger Dec 16, 2024
db53775
fix(cypress): change assertion field name
AkshayaFoiger Dec 16, 2024
e33acec
refactor(router): remove type import
AkshayaFoiger Dec 17, 2024
0e0dde8
refactor(router): merge validate_capture_method() and validate_paymen…
AkshayaFoiger Dec 17, 2024
ab161b0
refactor(feature_matrix): remove payment method wise nesting
AkshayaFoiger Dec 18, 2024
f2d97d9
refactor(router): change the return type of ConnectorSpecifications f…
AkshayaFoiger Dec 19, 2024
ffdb4e5
Merge branch 'main' into pm-details-doc
AkshayaFoiger Dec 19, 2024
e138851
chore: fix merge conflicts
AkshayaFoiger Dec 19, 2024
fbce038
Merge branch 'main' into pm-details-doc
AkshayaFoiger Dec 20, 2024
6e0c329
chore: fix formatting error
AkshayaFoiger Dec 20, 2024
71f623b
chore: fix formatiing
AkshayaFoiger Dec 20, 2024
f956a62
chore: fix clippy error
AkshayaFoiger Dec 20, 2024
9fa021b
chore: fix openapi_spec
AkshayaFoiger Dec 20, 2024
07f8a1c
Merge branch 'main' into pm-details-doc
AkshayaFoiger Dec 20, 2024
11bf497
Update cypress-tests/cypress/support/commands.js
AkshayaFoiger Dec 20, 2024
954fa23
Merge branch 'main' into pm-details-doc
AkshayaFoiger Dec 23, 2024
9a3116f
Merge branch 'main' into pm-details-doc
AkshayaFoiger Dec 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

132 changes: 132 additions & 0 deletions api-reference-v2/openapi_spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -6700,6 +6700,43 @@
"zsl"
]
},
"ConnectorFeatureMatrixResponse": {
"type": "object",
"required": [
"name",
"supported_payment_methods"
],
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string",
"nullable": true
},
"category": {
"allOf": [
{
"$ref": "#/components/schemas/PaymentConnectorCategory"
}
],
"nullable": true
},
"supported_payment_methods": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SupportedPaymentMethod"
}
},
"supported_webhook_flows": {
"type": "array",
"items": {
"$ref": "#/components/schemas/EventClass"
},
"nullable": true
}
}
},
"ConnectorMetadata": {
"type": "object",
"description": "Some connectors like Apple Pay, Airwallex and Noon might require some additional information, find specific details in the child attributes below.",
Expand Down Expand Up @@ -8672,6 +8709,38 @@
}
}
},
"FeatureMatrixListResponse": {
"type": "object",
"required": [
"connector_count",
"connectors"
],
"properties": {
"connector_count": {
"type": "integer",
"description": "The number of connectors included in the response",
"minimum": 0
},
"connectors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ConnectorFeatureMatrixResponse"
}
}
}
},
"FeatureMatrixRequest": {
"type": "object",
"properties": {
"connectors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Connector"
},
"nullable": true
}
}
},
"FeatureMetadata": {
"type": "object",
"description": "additional data that might be required by hyperswitch",
Expand Down Expand Up @@ -8702,6 +8771,14 @@
}
}
},
"FeatureStatus": {
"type": "string",
"description": "The status of the feature",
"enum": [
"not_supported",
"supported"
]
},
"FieldType": {
"oneOf": [
{
Expand Down Expand Up @@ -12746,6 +12823,15 @@
}
]
},
"PaymentConnectorCategory": {
"type": "string",
"description": "Connector Access Method",
"enum": [
"payment_gateway",
"alternative_payment_method",
"bank_acquirer"
]
},
"PaymentCreatePaymentLinkConfig": {
"allOf": [
{
Expand Down Expand Up @@ -20591,6 +20677,52 @@
},
"additionalProperties": false
},
"SupportedPaymentMethod": {
"type": "object",
"required": [
"payment_method",
"payment_method_type",
"mandates",
"refunds",
"supported_capture_methods"
],
"properties": {
"payment_method": {
"$ref": "#/components/schemas/PaymentMethod"
},
"payment_method_type": {
"$ref": "#/components/schemas/PaymentMethodType"
},
"mandates": {
"$ref": "#/components/schemas/FeatureStatus"
},
"refunds": {
"$ref": "#/components/schemas/FeatureStatus"
},
"supported_capture_methods": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CaptureMethod"
}
},
"supported_countries": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CountryAlpha2"
},
"uniqueItems": true,
"nullable": true
},
"supported_currencies": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Currency"
},
"uniqueItems": true,
"nullable": true
}
}
},
"SurchargeCalculationOverride": {
"type": "string",
"enum": [
Expand Down
132 changes: 132 additions & 0 deletions api-reference/openapi_spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -9319,6 +9319,43 @@
"zsl"
]
},
"ConnectorFeatureMatrixResponse": {
"type": "object",
"required": [
"name",
"supported_payment_methods"
],
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string",
"nullable": true
},
"category": {
"allOf": [
{
"$ref": "#/components/schemas/PaymentConnectorCategory"
}
],
"nullable": true
},
"supported_payment_methods": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SupportedPaymentMethod"
}
},
"supported_webhook_flows": {
"type": "array",
"items": {
"$ref": "#/components/schemas/EventClass"
},
"nullable": true
}
}
},
"ConnectorMetadata": {
"type": "object",
"description": "Some connectors like Apple Pay, Airwallex and Noon might require some additional information, find specific details in the child attributes below.",
Expand Down Expand Up @@ -11269,6 +11306,38 @@
}
}
},
"FeatureMatrixListResponse": {
"type": "object",
"required": [
"connector_count",
"connectors"
],
"properties": {
"connector_count": {
"type": "integer",
"description": "The number of connectors included in the response",
"minimum": 0
},
"connectors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ConnectorFeatureMatrixResponse"
}
}
}
},
"FeatureMatrixRequest": {
"type": "object",
"properties": {
"connectors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Connector"
},
"nullable": true
}
}
},
"FeatureMetadata": {
"type": "object",
"description": "additional data that might be required by hyperswitch",
Expand Down Expand Up @@ -11299,6 +11368,14 @@
}
}
},
"FeatureStatus": {
"type": "string",
"description": "The status of the feature",
"enum": [
"not_supported",
"supported"
]
},
"FieldType": {
"oneOf": [
{
Expand Down Expand Up @@ -15782,6 +15859,15 @@
}
]
},
"PaymentConnectorCategory": {
"type": "string",
"description": "Connector Access Method",
"enum": [
"payment_gateway",
"alternative_payment_method",
"bank_acquirer"
]
},
"PaymentCreatePaymentLinkConfig": {
"allOf": [
{
Expand Down Expand Up @@ -25077,6 +25163,52 @@
}
}
},
"SupportedPaymentMethod": {
"type": "object",
"required": [
"payment_method",
"payment_method_type",
"mandates",
"refunds",
"supported_capture_methods"
],
"properties": {
"payment_method": {
"$ref": "#/components/schemas/PaymentMethod"
},
"payment_method_type": {
"$ref": "#/components/schemas/PaymentMethodType"
},
"mandates": {
"$ref": "#/components/schemas/FeatureStatus"
},
"refunds": {
"$ref": "#/components/schemas/FeatureStatus"
},
"supported_capture_methods": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CaptureMethod"
}
},
"supported_countries": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CountryAlpha2"
},
"uniqueItems": true,
"nullable": true
},
"supported_currencies": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Currency"
},
"uniqueItems": true,
"nullable": true
}
}
},
"SurchargeDetailsResponse": {
"type": "object",
"required": [
Expand Down
4 changes: 4 additions & 0 deletions config/config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,10 @@ seicomart = { country = "JP", currency = "JPY" }
pay_easy = { country = "JP", currency = "JPY" }
boleto = { country = "BR", currency = "BRL" }

[pm_filters.bambora]
credit = { country = "US,CA", currency = "USD" }
debit = { country = "US,CA", currency = "USD" }

[pm_filters.volt]
open_banking_uk = { country = "DE,GB,AT,BE,CY,EE,ES,FI,FR,GR,HR,IE,IT,LT,LU,LV,MT,NL,PT,SI,SK,BG,CZ,DK,HU,NO,PL,RO,SE,AU,BR", currency = "EUR,GBP,DKK,NOK,PLN,SEK,AUD,BRL" }

Expand Down
4 changes: 4 additions & 0 deletions config/deployments/integration_test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,10 @@ we_chat_pay = { country = "AU,NZ,CN,JP,HK,SG,ES,GB,SE,NO,AT,NL,DE,CY,CH,BE,FR,DK
google_pay.currency = "CHF,DKK,EUR,GBP,NOK,PLN,SEK,USD,AUD,NZD,CAD"
paypal.currency = "CHF,DKK,EUR,GBP,NOK,PLN,SEK,USD,AUD,NZD,CAD"

[pm_filters.bambora]
credit = { country = "US,CA", currency = "USD" }
debit = { country = "US,CA", currency = "USD" }

[pm_filters.bankofamerica]
credit = { currency = "USD" }
debit = { currency = "USD" }
Expand Down
4 changes: 4 additions & 0 deletions config/deployments/production.toml
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,10 @@ we_chat_pay = { country = "AU,NZ,CN,JP,HK,SG,ES,GB,SE,NO,AT,NL,DE,CY,CH,BE,FR,DK
google_pay.currency = "CHF,DKK,EUR,GBP,NOK,PLN,SEK,USD,AUD,NZD,CAD"
paypal.currency = "CHF,DKK,EUR,GBP,NOK,PLN,SEK,USD,AUD,NZD,CAD"

[pm_filters.bambora]
credit = { country = "US,CA", currency = "USD" }
debit = { country = "US,CA", currency = "USD" }

[pm_filters.bankofamerica]
credit = { currency = "USD" }
debit = { currency = "USD" }
Expand Down
4 changes: 4 additions & 0 deletions config/deployments/sandbox.toml
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,10 @@ pix = { country = "BR", currency = "BRL" }
google_pay.currency = "CHF,DKK,EUR,GBP,NOK,PLN,SEK,USD,AUD,NZD,CAD"
paypal.currency = "CHF,DKK,EUR,GBP,NOK,PLN,SEK,USD,AUD,NZD,CAD"

[pm_filters.bambora]
credit = { country = "US,CA", currency = "USD" }
debit = { country = "US,CA", currency = "USD" }

[pm_filters.bankofamerica]
credit = { currency = "USD" }
debit = { currency = "USD" }
Expand Down
4 changes: 4 additions & 0 deletions config/development.toml
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,10 @@ pay_easy = { country = "JP", currency = "JPY" }
pix = { country = "BR", currency = "BRL" }
boleto = { country = "BR", currency = "BRL" }

[pm_filters.bambora]
credit = { country = "US,CA", currency = "USD" }
debit = { country = "US,CA", currency = "USD" }

[pm_filters.bankofamerica]
credit = { currency = "USD" }
debit = { currency = "USD" }
Expand Down
Loading
Loading