Skip to content

Commit

Permalink
Merge branch 'main' into connector-status
Browse files Browse the repository at this point in the history
  • Loading branch information
ThisIsMani authored Nov 17, 2023
2 parents 935c941 + f735fb0 commit 68c6c35
Show file tree
Hide file tree
Showing 221 changed files with 11,382 additions and 502 deletions.
Binary file modified .github/secrets/connector_auth.toml.gpg
Binary file not shown.
1 change: 1 addition & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ optin = "optin" # Boku preflow name
optin_id = "optin_id" # Boku's id for optin flow
deriver = "deriver"
Deriver = "Deriver"
requestor_card_reference = "requestor_card_reference"

[default.extend-words]
aci = "aci" # Name of a connector
Expand Down
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,39 @@ All notable changes to HyperSwitch will be documented here.

- - -

## 1.81.0 (2023-11-16)

### Features

- **connector:**
- [BANKOFAMERICA] Implement Cards for Bank of America ([#2765](https://github.com/juspay/hyperswitch/pull/2765)) ([`e8de3a7`](https://github.com/juspay/hyperswitch/commit/e8de3a710710b92f5c2351c5d67c22352c2b0a30))
- [ProphetPay] Implement Card Redirect PaymentMethodType and flows for Authorize, CompleteAuthorize, Psync, Refund, Rsync and Void ([#2641](https://github.com/juspay/hyperswitch/pull/2641)) ([`8d4adc5`](https://github.com/juspay/hyperswitch/commit/8d4adc52af57ed0994e6efbb5b2d0d3df3fb3150))

### Testing

- **postman:** Update postman collection files ([`f829197`](https://github.com/juspay/hyperswitch/commit/f8291973c38bde874c45ca15ff8d48c1f2de9781))

**Full Changelog:** [`v1.80.0...v1.81.0`](https://github.com/juspay/hyperswitch/compare/v1.80.0...v1.81.0)

- - -


## 1.80.0 (2023-11-16)

### Features

- **router:** Add api to migrate card from basilisk to rust ([#2853](https://github.com/juspay/hyperswitch/pull/2853)) ([`b8b20c4`](https://github.com/juspay/hyperswitch/commit/b8b20c412df0485bf395f9aa21e6e34e90d97acd))
- Spawn webhooks and async scheduling in background ([#2780](https://github.com/juspay/hyperswitch/pull/2780)) ([`f248fe2`](https://github.com/juspay/hyperswitch/commit/f248fe2889c9cb68af4464ab0db1735224ab5c8d))

### Refactors

- **router:** Add openapi spec support for gsm apis ([#2871](https://github.com/juspay/hyperswitch/pull/2871)) ([`62c9cca`](https://github.com/juspay/hyperswitch/commit/62c9ccae6ab0d128c54962675b88739ad7797fe6))

**Full Changelog:** [`v1.79.0...v1.80.0`](https://github.com/juspay/hyperswitch/compare/v1.79.0...v1.80.0)

- - -


## 1.79.0 (2023-11-16)

### Features
Expand Down
204 changes: 106 additions & 98 deletions config/config.example.toml

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions config/development.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ applepay_endpoint = "DOMAIN SPECIFIC ENDPOINT"

[locker]
host = ""
host_rs = ""
mock_locker = true
basilisk_host = ""

Expand All @@ -59,6 +60,7 @@ locker_encryption_key2 = ""
locker_decryption_key1 = ""
locker_decryption_key2 = ""
vault_encryption_key = ""
rust_locker_encryption_key = ""
vault_private_key = ""
tunnel_private_key = ""

Expand Down Expand Up @@ -353,6 +355,9 @@ credit = { currency = "USD" }
debit = { currency = "USD" }
ach = { currency = "USD" }

[pm_filters.prophetpay]
card_redirect = { currency = "USD" }

[pm_filters.trustpay]
credit = { not_available_flows = { capture_method = "manual" } }
debit = { not_available_flows = { capture_method = "manual" } }
Expand Down
5 changes: 5 additions & 0 deletions config/docker_compose.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ recon_admin_api_key = "recon_test_admin"

[locker]
host = ""
host_rs = ""
mock_locker = true
basilisk_host = ""

Expand All @@ -55,6 +56,7 @@ locker_encryption_key2 = ""
locker_decryption_key1 = ""
locker_decryption_key2 = ""
vault_encryption_key = ""
rust_locker_encryption_key = ""
vault_private_key = ""

[redis]
Expand Down Expand Up @@ -283,6 +285,9 @@ red_pagos = { country = "UY", currency = "UYU" }
[pm_filters.stripe]
cashapp = {country = "US", currency = "USD"}

[pm_filters.prophetpay]
card_redirect = { currency = "USD" }

[pm_filters.stax]
credit = { currency = "USD" }
debit = { currency = "USD" }
Expand Down
14 changes: 10 additions & 4 deletions crates/api_models/src/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ pub enum Connector {
Airwallex,
Authorizedotnet,
Bambora,
// Bankofamerica, Added as template code for future usage
Bankofamerica,
Bitpay,
Bluesnap,
Boku,
Expand Down Expand Up @@ -108,7 +108,7 @@ pub enum Connector {
Paypal,
Payu,
Powertranz,
// Prophetpay, added as a template code for future usage
Prophetpay,
Rapyd,
Shift4,
Square,
Expand Down Expand Up @@ -196,7 +196,7 @@ pub enum RoutableConnectors {
Adyen,
Airwallex,
Authorizedotnet,
// Bankofamerica, Added as template code for future usage
Bankofamerica,
Bitpay,
Bambora,
Bluesnap,
Expand Down Expand Up @@ -229,7 +229,7 @@ pub enum RoutableConnectors {
Paypal,
Payu,
Powertranz,
// Prophetpay, added as a template code for future usage
Prophetpay,
Rapyd,
Shift4,
Square,
Expand Down Expand Up @@ -562,3 +562,9 @@ pub enum RetryAction {
/// Denotes that the payment is requeued
Requeue,
}

#[derive(Clone, Copy)]
pub enum LockerChoice {
Basilisk,
Tartarus,
}
1 change: 1 addition & 0 deletions crates/api_models/src/events.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
pub mod customer;
pub mod gsm;
mod locker_migration;
pub mod payment;
#[cfg(feature = "payouts")]
pub mod payouts;
Expand Down
9 changes: 9 additions & 0 deletions crates/api_models/src/events/locker_migration.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
use common_utils::events::ApiEventMetric;

use crate::locker_migration::MigrateCardResponse;

impl ApiEventMetric for MigrateCardResponse {
fn get_api_event_type(&self) -> Option<common_utils::events::ApiEventsType> {
Some(common_utils::events::ApiEventsType::RustLocker)
}
}
1 change: 1 addition & 0 deletions crates/api_models/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ pub mod errors;
pub mod events;
pub mod files;
pub mod gsm;
pub mod locker_migration;
pub mod mandates;
pub mod organization;
pub mod payment_methods;
Expand Down
8 changes: 8 additions & 0 deletions crates/api_models/src/locker_migration.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#[derive(Debug, Clone, serde::Serialize)]
#[serde(rename_all = "camelCase")]
pub struct MigrateCardResponse {
pub status_message: String,
pub status_code: String,
pub customers_moved: usize,
pub cards_moved: usize,
}
2 changes: 2 additions & 0 deletions crates/api_models/src/payments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,7 @@ pub enum CardRedirectData {
Knet {},
Benefit {},
MomoAtm {},
CardRedirect {},
}

#[derive(Eq, PartialEq, Clone, Debug, serde::Deserialize, serde::Serialize, ToSchema)]
Expand Down Expand Up @@ -868,6 +869,7 @@ impl GetPaymentMethodType for CardRedirectData {
Self::Knet {} => api_enums::PaymentMethodType::Knet,
Self::Benefit {} => api_enums::PaymentMethodType::Benefit,
Self::MomoAtm {} => api_enums::PaymentMethodType::MomoAtm,
Self::CardRedirect {} => api_enums::PaymentMethodType::CardRedirect,
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion crates/api_models/src/routing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,9 @@ impl From<RoutableConnectorChoice> for ast::ConnectorChoice {
RoutableConnectors::Adyen => euclid_enums::Connector::Adyen,
RoutableConnectors::Airwallex => euclid_enums::Connector::Airwallex,
RoutableConnectors::Authorizedotnet => euclid_enums::Connector::Authorizedotnet,
RoutableConnectors::Bitpay => euclid_enums::Connector::Bitpay,
RoutableConnectors::Bambora => euclid_enums::Connector::Bambora,
RoutableConnectors::Bankofamerica => euclid_enums::Connector::Bankofamerica,
RoutableConnectors::Bitpay => euclid_enums::Connector::Bitpay,
RoutableConnectors::Bluesnap => euclid_enums::Connector::Bluesnap,
RoutableConnectors::Boku => euclid_enums::Connector::Boku,
RoutableConnectors::Braintree => euclid_enums::Connector::Braintree,
Expand Down Expand Up @@ -336,6 +337,7 @@ impl From<RoutableConnectorChoice> for ast::ConnectorChoice {
RoutableConnectors::Paypal => euclid_enums::Connector::Paypal,
RoutableConnectors::Payu => euclid_enums::Connector::Payu,
RoutableConnectors::Powertranz => euclid_enums::Connector::Powertranz,
RoutableConnectors::Prophetpay => euclid_enums::Connector::Prophetpay,
RoutableConnectors::Rapyd => euclid_enums::Connector::Rapyd,
RoutableConnectors::Shift4 => euclid_enums::Connector::Shift4,
RoutableConnectors::Square => euclid_enums::Connector::Square,
Expand Down
1 change: 1 addition & 0 deletions crates/common_enums/src/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -990,6 +990,7 @@ pub enum PaymentMethodType {
BcaBankTransfer,
BniVa,
BriVa,
CardRedirect,
CimbVa,
#[serde(rename = "classic")]
ClassicReward,
Expand Down
1 change: 1 addition & 0 deletions crates/common_enums/src/transformers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1807,6 +1807,7 @@ impl From<PaymentMethodType> for PaymentMethod {
PaymentMethodType::Bizum => Self::BankRedirect,
PaymentMethodType::Blik => Self::BankRedirect,
PaymentMethodType::Alfamart => Self::Voucher,
PaymentMethodType::CardRedirect => Self::CardRedirect,
PaymentMethodType::CimbVa => Self::BankTransfer,
PaymentMethodType::ClassicReward => Self::Reward,
PaymentMethodType::Credit => Self::Card,
Expand Down
6 changes: 6 additions & 0 deletions crates/common_utils/src/consts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,9 @@ pub const DEFAULT_PRODUCT_IMG: &str = "https://i.imgur.com/On3VtKF.png";

/// Default Merchant Logo Link
pub const DEFAULT_MERCHANT_LOGO: &str = "https://i.imgur.com/RfxPFQo.png";

/// Redirect url for Prophetpay
pub const PROPHETPAY_REDIRECT_URL: &str = "https://ccm-thirdparty.cps.golf/hp/tokenize/";

/// Variable which store the card token for Prophetpay
pub const PROPHETPAY_TOKEN: &str = "cctoken";
1 change: 1 addition & 0 deletions crates/common_utils/src/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ pub enum ApiEventsType {
Gsm,
// TODO: This has to be removed once the corresponding apiEventTypes are created
Miscellaneous,
RustLocker,
}

impl ApiEventMetric for serde_json::Value {}
Expand Down
4 changes: 3 additions & 1 deletion crates/euclid/src/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@ pub enum Connector {
Adyen,
Airwallex,
Authorizedotnet,
Bitpay,
Bambora,
Bankofamerica,
Bitpay,
Bluesnap,
Boku,
Braintree,
Expand Down Expand Up @@ -116,6 +117,7 @@ pub enum Connector {
Paypal,
Payu,
Powertranz,
Prophetpay,
Rapyd,
Shift4,
Square,
Expand Down
1 change: 1 addition & 0 deletions crates/euclid/src/frontend/dir/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ pub enum CardRedirectType {
Benefit,
Knet,
MomoAtm,
CardRedirect,
}

#[derive(
Expand Down
1 change: 1 addition & 0 deletions crates/euclid/src/frontend/dir/lowering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ impl From<enums::CardRedirectType> for global_enums::PaymentMethodType {
enums::CardRedirectType::Benefit => Self::Benefit,
enums::CardRedirectType::Knet => Self::Knet,
enums::CardRedirectType::MomoAtm => Self::MomoAtm,
enums::CardRedirectType::CardRedirect => Self::CardRedirect,
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions crates/euclid/src/frontend/dir/transformers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ impl IntoDirValue for (global_enums::PaymentMethodType, global_enums::PaymentMet
}
global_enums::PaymentMethodType::MomoAtm => Ok(dirval!(CardRedirectType = MomoAtm)),
global_enums::PaymentMethodType::Oxxo => Ok(dirval!(VoucherType = Oxxo)),
global_enums::PaymentMethodType::CardRedirect => {
Ok(dirval!(CardRedirectType = CardRedirect))
}
}
}
}
3 changes: 3 additions & 0 deletions crates/kgraph_utils/src/transformers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,9 @@ impl IntoDirValue for (api_enums::PaymentMethodType, api_enums::PaymentMethod) {
}
api_enums::PaymentMethodType::MomoAtm => Ok(dirval!(CardRedirectType = MomoAtm)),
api_enums::PaymentMethodType::Oxxo => Ok(dirval!(VoucherType = Oxxo)),
api_enums::PaymentMethodType::CardRedirect => {
Ok(dirval!(CardRedirectType = CardRedirect))
}
}
}
}
Expand Down
Loading

0 comments on commit 68c6c35

Please sign in to comment.