Skip to content

Commit

Permalink
feat(connector): [billwerk] implement payment and refund flows (#4245)
Browse files Browse the repository at this point in the history
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
  • Loading branch information
SamraatBansal and hyperswitch-bot[bot] authored Apr 1, 2024
1 parent 740749e commit aecf4ae
Show file tree
Hide file tree
Showing 20 changed files with 778 additions and 144 deletions.
2 changes: 2 additions & 0 deletions config/config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ authorizedotnet.base_url = "https://apitest.authorize.net/xml/v1/request.api"
bambora.base_url = "https://api.na.bambora.com"
bankofamerica.base_url = "https://apitest.merchant-services.bankofamerica.com/"
billwerk.base_url = "https://api.reepay.com/"
billwerk.secondary_base_url = "https://card.reepay.com/"
bitpay.base_url = "https://test.bitpay.com"
bluesnap.base_url = "https://sandbox.bluesnap.com/"
bluesnap.secondary_base_url = "https://sandpay.bluesnap.com/"
Expand Down Expand Up @@ -349,6 +350,7 @@ stax = { long_lived_token = true, payment_method = "card,bank_debit" }
square = { long_lived_token = false, payment_method = "card" }
braintree = { long_lived_token = false, payment_method = "card" }
gocardless = { long_lived_token = true, payment_method = "bank_debit" }
billwerk = {long_lived_token = false, payment_method = "card"}

[temp_locker_enable_config]
stripe = { payment_method = "bank_transfer" }
Expand Down
2 changes: 2 additions & 0 deletions config/deployments/integration_test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ authorizedotnet.base_url = "https://apitest.authorize.net/xml/v1/request.api"
bambora.base_url = "https://api.na.bambora.com"
bankofamerica.base_url = "https://apitest.merchant-services.bankofamerica.com/"
billwerk.base_url = "https://api.reepay.com/"
billwerk.secondary_base_url = "https://card.reepay.com/"
bitpay.base_url = "https://test.bitpay.com"
bluesnap.base_url = "https://sandbox.bluesnap.com/"
bluesnap.secondary_base_url = "https://sandpay.bluesnap.com/"
Expand Down Expand Up @@ -292,6 +293,7 @@ payme = { long_lived_token = false, payment_method = "card" }
square = { long_lived_token = false, payment_method = "card" }
stax = { long_lived_token = true, payment_method = "card,bank_debit" }
stripe = { long_lived_token = false, payment_method = "wallet", payment_method_type = { list = "google_pay", type = "disable_only" } }
billwerk = {long_lived_token = false, payment_method = "card"}

[webhooks]
outgoing_enabled = true
Expand Down
2 changes: 2 additions & 0 deletions config/deployments/production.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ authorizedotnet.base_url = "https://api.authorize.net/xml/v1/request.api"
bambora.base_url = "https://api.na.bambora.com"
bankofamerica.base_url = "https://api.merchant-services.bankofamerica.com/"
billwerk.base_url = "https://api.reepay.com/"
billwerk.secondary_base_url = "https://card.reepay.com/"
bitpay.base_url = "https://bitpay.com"
bluesnap.base_url = "https://ws.bluesnap.com/"
bluesnap.secondary_base_url = "https://pay.bluesnap.com/"
Expand Down Expand Up @@ -306,6 +307,7 @@ payme = { long_lived_token = false, payment_method = "card" }
square = { long_lived_token = false, payment_method = "card" }
stax = { long_lived_token = true, payment_method = "card,bank_debit" }
stripe = { long_lived_token = false, payment_method = "wallet", payment_method_type = { list = "google_pay", type = "disable_only" } }
billwerk = {long_lived_token = false, payment_method = "card"}

[webhooks]
outgoing_enabled = true
Expand Down
2 changes: 2 additions & 0 deletions config/deployments/sandbox.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ authorizedotnet.base_url = "https://apitest.authorize.net/xml/v1/request.api"
bambora.base_url = "https://api.na.bambora.com"
bankofamerica.base_url = "https://apitest.merchant-services.bankofamerica.com/"
billwerk.base_url = "https://api.reepay.com/"
billwerk.secondary_base_url = "https://card.reepay.com/"
bitpay.base_url = "https://test.bitpay.com"
bluesnap.base_url = "https://sandbox.bluesnap.com/"
bluesnap.secondary_base_url = "https://sandpay.bluesnap.com/"
Expand Down Expand Up @@ -308,6 +309,7 @@ payme = { long_lived_token = false, payment_method = "card" }
square = { long_lived_token = false, payment_method = "card" }
stax = { long_lived_token = true, payment_method = "card,bank_debit" }
stripe = { long_lived_token = false, payment_method = "wallet", payment_method_type = { list = "google_pay", type = "disable_only" } }
billwerk = {long_lived_token = false, payment_method = "card"}

[webhooks]
outgoing_enabled = true
Expand Down
2 changes: 2 additions & 0 deletions config/development.toml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ authorizedotnet.base_url = "https://apitest.authorize.net/xml/v1/request.api"
bambora.base_url = "https://api.na.bambora.com"
bankofamerica.base_url = "https://apitest.merchant-services.bankofamerica.com/"
billwerk.base_url = "https://api.reepay.com/"
billwerk.secondary_base_url = "https://card.reepay.com/"
bitpay.base_url = "https://test.bitpay.com"
bluesnap.base_url = "https://sandbox.bluesnap.com/"
bluesnap.secondary_base_url = "https://sandpay.bluesnap.com/"
Expand Down Expand Up @@ -450,6 +451,7 @@ square = { long_lived_token = false, payment_method = "card" }
braintree = { long_lived_token = false, payment_method = "card" }
payme = { long_lived_token = false, payment_method = "card" }
gocardless = { long_lived_token = true, payment_method = "bank_debit" }
billwerk = {long_lived_token = false, payment_method = "card"}

[temp_locker_enable_config]
stripe = { payment_method = "bank_transfer" }
Expand Down
2 changes: 2 additions & 0 deletions config/docker_compose.toml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ authorizedotnet.base_url = "https://apitest.authorize.net/xml/v1/request.api"
bambora.base_url = "https://api.na.bambora.com"
bankofamerica.base_url = "https://apitest.merchant-services.bankofamerica.com/"
billwerk.base_url = "https://api.reepay.com/"
billwerk.secondary_base_url = "https://card.reepay.com/"
bitpay.base_url = "https://test.bitpay.com"
bluesnap.base_url = "https://sandbox.bluesnap.com/"
bluesnap.secondary_base_url = "https://sandpay.bluesnap.com/"
Expand Down Expand Up @@ -251,6 +252,7 @@ stax = { long_lived_token = true, payment_method = "card,bank_debit" }
square = { long_lived_token = false, payment_method = "card" }
braintree = { long_lived_token = false, payment_method = "card" }
gocardless = { long_lived_token = true, payment_method = "bank_debit" }
billwerk = {long_lived_token = false, payment_method = "card"}

[temp_locker_enable_config]
stripe = { payment_method = "bank_transfer" }
Expand Down
6 changes: 3 additions & 3 deletions crates/api_models/src/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ pub enum Connector {
Authorizedotnet,
Bambora,
Bankofamerica,
// Billwerk, Added as template code for future usage
Billwerk,
Bitpay,
Bluesnap,
Boku,
Expand Down Expand Up @@ -166,7 +166,7 @@ impl Connector {
| Self::Authorizedotnet
| Self::Bambora
| Self::Bankofamerica
// | Self::Billwerk Added as template code for future usage
| Self::Billwerk
| Self::Bitpay
| Self::Bluesnap
| Self::Boku
Expand Down Expand Up @@ -223,7 +223,7 @@ impl Connector {
| Self::Authorizedotnet
| Self::Bambora
| Self::Bankofamerica
// | Self::Billwerk Added as template for future usage
| Self::Billwerk
| Self::Bitpay
| Self::Bluesnap
| Self::Boku
Expand Down
2 changes: 1 addition & 1 deletion crates/common_enums/src/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ pub enum RoutableConnectors {
Airwallex,
Authorizedotnet,
Bankofamerica,
// Billwerk, Added as template code for future usage
Billwerk,
Bitpay,
Bambora,
Bluesnap,
Expand Down
2 changes: 1 addition & 1 deletion crates/connector_configs/src/connector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ impl ConnectorConfig {
Connector::Airwallex => Ok(connector_data.airwallex),
Connector::Authorizedotnet => Ok(connector_data.authorizedotnet),
Connector::Bankofamerica => Ok(connector_data.bankofamerica),
// Connector::Billwerk => Ok(connector_data.billwerk), Added as template code for future usage
Connector::Billwerk => Ok(connector_data.billwerk),
Connector::Bitpay => Ok(connector_data.bitpay),
Connector::Bluesnap => Ok(connector_data.bluesnap),
Connector::Boku => Ok(connector_data.boku),
Expand Down
43 changes: 42 additions & 1 deletion crates/connector_configs/toml/development.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2587,4 +2587,45 @@ api_key="Api Key"
[threedsecureio.metadata]
mcc="MCC"
merchant_country_code="3 digit numeric country code"
merchant_name="Name of the merchant"
merchant_name="Name of the merchant"

[billwerk]
[[billwerk.credit]]
payment_method_type = "Mastercard"
[[billwerk.credit]]
payment_method_type = "Visa"
[[billwerk.credit]]
payment_method_type = "Interac"
[[billwerk.credit]]
payment_method_type = "AmericanExpress"
[[billwerk.credit]]
payment_method_type = "JCB"
[[billwerk.credit]]
payment_method_type = "DinersClub"
[[billwerk.credit]]
payment_method_type = "Discover"
[[billwerk.credit]]
payment_method_type = "CartesBancaires"
[[billwerk.credit]]
payment_method_type = "UnionPay"
[[billwerk.debit]]
payment_method_type = "Mastercard"
[[billwerk.debit]]
payment_method_type = "Visa"
[[billwerk.debit]]
payment_method_type = "Interac"
[[billwerk.debit]]
payment_method_type = "AmericanExpress"
[[billwerk.debit]]
payment_method_type = "JCB"
[[billwerk.debit]]
payment_method_type = "DinersClub"
[[billwerk.debit]]
payment_method_type = "Discover"
[[billwerk.debit]]
payment_method_type = "CartesBancaires"
[[billwerk.debit]]
payment_method_type = "UnionPay"
[billwerk.connector_auth.BodyKey]
api_key="Private Api Key"
key1="Public Api Key"
43 changes: 42 additions & 1 deletion crates/connector_configs/toml/production.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1913,4 +1913,45 @@ terminal_uuid="Terminal UUID"
pay_wall_secret="Pay Wall Secret"
[zen.metadata.google_pay]
terminal_uuid="Terminal UUID"
pay_wall_secret="Pay Wall Secret"
pay_wall_secret="Pay Wall Secret"

[billwerk]
[[billwerk.credit]]
payment_method_type = "Mastercard"
[[billwerk.credit]]
payment_method_type = "Visa"
[[billwerk.credit]]
payment_method_type = "Interac"
[[billwerk.credit]]
payment_method_type = "AmericanExpress"
[[billwerk.credit]]
payment_method_type = "JCB"
[[billwerk.credit]]
payment_method_type = "DinersClub"
[[billwerk.credit]]
payment_method_type = "Discover"
[[billwerk.credit]]
payment_method_type = "CartesBancaires"
[[billwerk.credit]]
payment_method_type = "UnionPay"
[[billwerk.debit]]
payment_method_type = "Mastercard"
[[billwerk.debit]]
payment_method_type = "Visa"
[[billwerk.debit]]
payment_method_type = "Interac"
[[billwerk.debit]]
payment_method_type = "AmericanExpress"
[[billwerk.debit]]
payment_method_type = "JCB"
[[billwerk.debit]]
payment_method_type = "DinersClub"
[[billwerk.debit]]
payment_method_type = "Discover"
[[billwerk.debit]]
payment_method_type = "CartesBancaires"
[[billwerk.debit]]
payment_method_type = "UnionPay"
[billwerk.connector_auth.BodyKey]
api_key="Private Api Key"
key1="Public Api Key"
43 changes: 42 additions & 1 deletion crates/connector_configs/toml/sandbox.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2589,4 +2589,45 @@ api_key="Api Key"
[threedsecureio.metadata]
mcc="MCC"
merchant_country_code="3 digit numeric country code"
merchant_name="Name of the merchant"
merchant_name="Name of the merchant"

[billwerk]
[[billwerk.credit]]
payment_method_type = "Mastercard"
[[billwerk.credit]]
payment_method_type = "Visa"
[[billwerk.credit]]
payment_method_type = "Interac"
[[billwerk.credit]]
payment_method_type = "AmericanExpress"
[[billwerk.credit]]
payment_method_type = "JCB"
[[billwerk.credit]]
payment_method_type = "DinersClub"
[[billwerk.credit]]
payment_method_type = "Discover"
[[billwerk.credit]]
payment_method_type = "CartesBancaires"
[[billwerk.credit]]
payment_method_type = "UnionPay"
[[billwerk.debit]]
payment_method_type = "Mastercard"
[[billwerk.debit]]
payment_method_type = "Visa"
[[billwerk.debit]]
payment_method_type = "Interac"
[[billwerk.debit]]
payment_method_type = "AmericanExpress"
[[billwerk.debit]]
payment_method_type = "JCB"
[[billwerk.debit]]
payment_method_type = "DinersClub"
[[billwerk.debit]]
payment_method_type = "Discover"
[[billwerk.debit]]
payment_method_type = "CartesBancaires"
[[billwerk.debit]]
payment_method_type = "UnionPay"
[billwerk.connector_auth.BodyKey]
api_key="Private Api Key"
key1="Public Api Key"
Loading

0 comments on commit aecf4ae

Please sign in to comment.