Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion config/config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1308,7 +1308,7 @@ fetch_altid_url= "" # base url to fetch Alt-ID and cryptogram for gues
connector_list = "adyen,cybersource,peachpayments,trustpay" # Supported connectors for network tokenization

[network_transaction_id_supported_connectors]
connector_list = "adyen,archipel,checkout,cybersource,novalnet,stripe,worldpay,worldpayvantiv,revolv3,peachpayments" # Supported connectors for network transaction id
connector_list = "adyen,archipel,authorizedotnet,checkout,cybersource,novalnet,stripe,worldpay,worldpayvantiv,revolv3,peachpayments" # Supported connectors for network transaction id

[card_only_mit_supported_connectors]
connector_list = "peachpayments" # Supported connectors for card only mit
Expand Down
2 changes: 1 addition & 1 deletion config/deployments/integration_test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ card.debit = "adyen"
adyen = "BRL,MXN,JPY"

[network_transaction_id_supported_connectors]
connector_list = "adyen,archipel,checkout,cybersource,novalnet,nuvei,stripe,worldpay,worldpayvantiv,revolv3,peachpayments"
connector_list = "adyen,archipel,authorizedotnet,checkout,cybersource,novalnet,nuvei,stripe,worldpay,worldpayvantiv,revolv3,peachpayments"

[card_only_mit_supported_connectors]
connector_list = "peachpayments" # Supported connectors for card only mit
Expand Down
2 changes: 1 addition & 1 deletion config/deployments/production.toml
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ card.debit = "adyen"
adyen = "BRL,MXN,JPY"

[network_transaction_id_supported_connectors]
connector_list = "adyen,archipel,checkout,cybersource,stripe,nuvei,worldpayvantiv,revolv3,peachpayments"
connector_list = "adyen,archipel,authorizedotnet,checkout,cybersource,stripe,nuvei,worldpayvantiv,revolv3,peachpayments"

[card_only_mit_supported_connectors]
connector_list = "peachpayments" # Supported connectors for card only mit
Expand Down
2 changes: 1 addition & 1 deletion config/deployments/sandbox.toml
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ card.debit = "adyen"
adyen = "BRL,MXN,JPY"

[network_transaction_id_supported_connectors]
connector_list = "adyen,archipel,checkout,cybersource,novalnet,nuvei,stripe,worldpay,worldpayvantiv,revolv3,peachpayments"
connector_list = "adyen,archipel,authorizedotnet,checkout,cybersource,novalnet,nuvei,stripe,worldpay,worldpayvantiv,revolv3,peachpayments"

[card_only_mit_supported_connectors]
connector_list = "peachpayments" # Supported connectors for card only mit
Expand Down
2 changes: 1 addition & 1 deletion config/development.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1238,7 +1238,7 @@ card.debit = "adyen"
adyen = "BRL,MXN,JPY"

[network_transaction_id_supported_connectors]
connector_list = "adyen,archipel,checkout,cybersource,novalnet,nuvei,stripe,worldpay,worldpayvantiv,revolv3,peachpayments"
connector_list = "adyen,archipel,authorizedotnet,checkout,cybersource,novalnet,nuvei,stripe,worldpay,worldpayvantiv,revolv3,peachpayments"

[card_only_mit_supported_connectors]
connector_list = "peachpayments" # Supported connectors for card only mit
Expand Down
2 changes: 1 addition & 1 deletion config/docker_compose.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1134,7 +1134,7 @@ card.debit = "adyen"
adyen = "BRL,MXN,JPY"

[network_transaction_id_supported_connectors]
connector_list = "adyen,archipel,checkout,cybersource,novalnet,stripe,worldpay,worldpayvantiv,revolv3,peachpayments"
connector_list = "adyen,archipel,authorizedotnet,checkout,cybersource,novalnet,stripe,worldpay,worldpayvantiv,revolv3,peachpayments"

[card_only_mit_supported_connectors]
connector_list = "peachpayments" # Supported connectors for card only mit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -923,22 +923,29 @@ impl
transaction_type: TransactionType::try_from(item.router_data.request.capture_method)?,
amount: item.amount,
currency_code: item.router_data.request.currency,
payment: Some(match item.router_data.request.payment_method_data {
payment: match item.router_data.request.payment_method_data {
PaymentMethodData::Card(ref ccard) => {
PaymentDetails::CreditCard(CreditCardDetails {
Some(PaymentDetails::CreditCard(CreditCardDetails {
card_number: (*ccard.card_number).clone(),
expiration_date: ccard.get_expiry_date_as_yyyymm("-"),
card_code: None,
})
}))
}
PaymentMethodData::CardDetailsForNetworkTransactionId(ref card_details) => {
Some(PaymentDetails::CreditCard(CreditCardDetails {
card_number: (*card_details.card_number).clone(),
expiration_date: card_details.get_expiry_date_as_yyyymm("-"),
card_code: None,
}))
}
PaymentMethodData::MandatePayment => None,
PaymentMethodData::CardRedirect(_)
| PaymentMethodData::Wallet(_)
| PaymentMethodData::PayLater(_)
| PaymentMethodData::BankRedirect(_)
| PaymentMethodData::BankDebit(_)
| PaymentMethodData::BankTransfer(_)
| PaymentMethodData::Crypto(_)
| PaymentMethodData::MandatePayment
| PaymentMethodData::Reward
| PaymentMethodData::RealTimePayment(_)
| PaymentMethodData::MobilePayment(_)
Expand All @@ -948,7 +955,6 @@ impl
| PaymentMethodData::OpenBanking(_)
| PaymentMethodData::CardToken(_)
| PaymentMethodData::NetworkToken(_)
| PaymentMethodData::CardDetailsForNetworkTransactionId(_)
| PaymentMethodData::CardWithOptionalCVC(_)
| PaymentMethodData::CardWithNetworkTokenDetails(_)
| PaymentMethodData::CardWithLimitedDetails(_)
Expand All @@ -958,7 +964,7 @@ impl
utils::get_unimplemented_payment_method_error_message("authorizedotnet"),
))?
}
}),
},
profile: None,
order: Order {
invoice_number: match &item.router_data.request.merchant_order_reference_id {
Expand Down
8 changes: 5 additions & 3 deletions crates/router/build.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
fn main() {
// Set thread stack size to 11 MiB for debug builds
// NOTE: the worker-thread stack size for debug builds is set at *runtime*
// in `src/bin/router.rs` (via `RUST_MIN_STACK`), not here. A
// `cargo:rustc-env` instruction only affects the compile-time environment
// (`env!`) and does not size threads spawned by `std`/Tokio/actix at
// runtime, so it cannot prevent stack overflows in deep async flows.
// Reference: https://doc.rust-lang.org/std/thread/#stack-size
#[cfg(debug_assertions)]
println!("cargo:rustc-env=RUST_MIN_STACK=11534336"); // 11 * 1024 * 1024 = 11 MiB

#[cfg(feature = "vergen")]
router_env::vergen::generate_cargo_instructions();
Expand Down
27 changes: 25 additions & 2 deletions crates/router/src/bin/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,31 @@ use router::{
routes::metrics,
};

#[tokio::main]
async fn main() -> ApplicationResult<()> {
fn main() -> ApplicationResult<()> {
// In debug builds the deeply-nested async payment flows (notably the
// auto-retry path, which re-enters the entire payment execution) can exceed
// the default worker-thread stack and abort the process with a stack
// overflow. Raise the stack size for every worker thread *before* the Tokio
// runtime is created, because `std` caches `RUST_MIN_STACK` on the first
// thread spawn — setting it after the runtime is built has no effect on the
// already-spawned Tokio/actix worker threads.
//
// Release builds are unaffected: this block is compiled out and, thanks to
// optimization, they never reach this stack depth. An explicit
// `RUST_MIN_STACK` from the environment is always respected.
#[cfg(debug_assertions)]
if std::env::var_os("RUST_MIN_STACK").is_none() {
std::env::set_var("RUST_MIN_STACK", "67108864"); // 64 MiB
}

tokio::runtime::Builder::new_multi_thread()
.enable_all()
.build()
.change_context(ApplicationError::ConfigurationError)?
.block_on(run())
}

async fn run() -> ApplicationResult<()> {
// get commandline config before initializing config
let cmd_line = <CmdLineConf as clap::Parser>::parse();

Expand Down
5 changes: 2 additions & 3 deletions cypress-tests/cypress/e2e/configs/Payment/Utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import { connectorDetails as bamboraConnectorDetails } from "./Bambora.js";
import { connectorDetails as bamboraapacConnectorDetails } from "./Bamboraapac.js";
import { connectorDetails as bankOfAmericaConnectorDetails } from "./BankOfAmerica.js";
import { connectorDetails as barclaycardConnectorDetails } from "./Barclaycard.js";
import { connectorDetails as bitpayConnectorDetails } from "./Bitpay.js";
import { connectorDetails as billwerkConnectorDetails } from "./Billwerk.js";
import { connectorDetails as bitpayConnectorDetails } from "./Bitpay.js";
import { connectorDetails as bluesnapConnectorDetails } from "./Bluesnap.js";
import { connectorDetails as braintreeConnectorDetails } from "./Braintree.js";
import { connectorDetails as calidaConnectorDetails } from "./Calida.js";
Expand Down Expand Up @@ -46,6 +46,7 @@ import { connectorDetails as itaubankConnectorDetails } from "./ItauBank.js";
import { connectorDetails as jpmorganConnectorDetails } from "./Jpmorgan.js";
import { connectorDetails as klarnaConnectorDetails } from "./Klarna.js";
import { connectorDetails as loonioConnectorDetails } from "./Loonio.js";
import { connectorDetails as mifinityConnectorDetails } from "./Mifinity.js";
import { connectorDetails as mollieConnectorDetails } from "./Mollie.js";
import { connectorDetails as monerisConnectorDetails } from "./Moneris.js";
import { connectorDetails as multisafepayConnectorDetails } from "./Multisafepay.js";
Expand Down Expand Up @@ -82,7 +83,6 @@ import { connectorDetails as worldpayvantivConnectorDetails } from "./Worldpayva
import { connectorDetails as worldpayxmlConnectorDetails } from "./Worldpayxml.js";
import { connectorDetails as xenditConnectorDetails } from "./Xendit.js";
import { connectorDetails as ziftConnectorDetails } from "./Zift.js";
import { connectorDetails as mifinityConnectorDetails } from "./Mifinity.js";
const connectorDetails = {
aci: aciConnectorDetails,
adyen: adyenConnectorDetails,
Expand Down Expand Up @@ -484,7 +484,6 @@ export const CONNECTOR_LISTS = {
// Exclusion lists (skip these connectors)
EXCLUDE: {
CONNECTOR_AGNOSTIC_NTID: [
"authorizedotnet",
"bamboraapac",
"bankofamerica",
"billwerk",
Expand Down
Loading