text stringlengths 70 351k | source stringclasses 4
values |
|---|---|
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs | crate: test_utils | connector: adyen_uk_ui
fn should_make_adyen_clearpay_payment_test() {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs | crate: test_utils | connector: adyen_uk_ui
fn should_make_adyen_bizum_payment_test() {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs | crate: test_utils | connector: adyen_uk_ui
fn should_make_adyen_swish_payment_test() {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs | crate: test_utils | connector: adyen_uk_ui
fn should_make_adyen_alipay_hk_payment_test() {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs | crate: test_utils | connector: adyen_uk_ui
fn should_make_adyen_3ds_payment_success_test() {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs | crate: test_utils | connector: adyen_uk_ui
fn should_make_adyen_3ds_mandate_with_zero_dollar_payment_test() {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs | crate: test_utils | connector: adyen_uk_ui
fn should_make_adyen_3ds_mandate_payment_test() {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs | crate: test_utils | connector: adyen_uk_ui
fn should_make_adyen_3ds_payment_failed_test() {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs | crate: test_utils | connector: adyen_uk_ui
fn should_make_adyen_klarna_mandate_payment_test() {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs | crate: test_utils | connector: adyen_uk_ui
fn should_make_adyen_gpay_zero_dollar_mandate_payment_test() {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs | crate: test_utils | connector: adyen_uk_ui
fn should_make_adyen_gpay_mandate_payment_test() {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs | crate: test_utils | connector: adyen_uk_ui
fn should_make_adyen_gpay_payment_test() {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs | crate: test_utils | connector: adyen_uk_ui
async fn should_make_adyen_momo_atm_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs | crate: test_utils | connector: adyen_uk_ui
async fn should_make_adyen_blik_payment(driver: WebDriver) -> Result<(), WebDriverError> {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs | crate: test_utils | connector: adyen_uk_ui
async fn should_make_adyen_swish_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs | crate: test_utils | connector: adyen_uk_ui
async fn should_make_adyen_touch_n_go_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs | crate: test_utils | connector: adyen_uk_ui
async fn should_make_adyen_online_banking_thailand_payment(
web_driver: WebDriver,
) -> Result<(), WebDriverError> {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs | crate: test_utils | connector: adyen_uk_ui
async fn should_make_adyen_online_banking_fpx_payment(
web_driver: WebDriver,
) -> Result<(), WebDriverError> {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs | crate: test_utils | connector: adyen_uk_ui
async fn should_make_adyen_twint_payment(driver: WebDriver) -> Result<(), WebDriverError> {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs | crate: test_utils | connector: adyen_uk_ui
async fn should_make_adyen_onlinebanking_pl_payment(
web_driver: WebDriver,
) -> Result<(), WebDriverError> {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs | crate: test_utils | connector: adyen_uk_ui
async fn should_make_adyen_ebanking_fi_payment(
web_driver: WebDriver,
) -> Result<(), WebDriverError> {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs | crate: test_utils | connector: adyen_uk_ui
async fn should_make_adyen_mbway_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs | crate: test_utils | connector: adyen_uk_ui
async fn should_make_adyen_wechatpay_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs | crate: test_utils | connector: adyen_uk_ui
async fn should_make_adyen_eps_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs | crate: test_utils | connector: adyen_uk_ui
async fn should_make_adyen_ideal_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
// file: hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs | crate: test_utils | connector: adyen_uk_ui
async fn should_make_adyen_bacs_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
let conn = AdyenSeleniumTest {};
conn.make_redirection_payment(
web_driver,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/54"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Assert(Assert::IsPresent("Status")),
Event::Assert(Assert::IsPresent("processing")), //final status of this payment method will remain in processing state
],
)
.await?;
Ok(())
} | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs | crate: test_utils | connector: adyen_uk_ui
async fn should_make_adyen_sepa_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs | crate: test_utils | connector: adyen_uk_ui
async fn should_make_adyen_ach_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs | crate: test_utils | connector: adyen_uk_ui
async fn should_make_adyen_paypal_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs | crate: test_utils | connector: adyen_uk_ui
async fn should_make_adyen_clearpay_payment(driver: WebDriver) -> Result<(), WebDriverError> {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs | crate: test_utils | connector: adyen_uk_ui
async fn should_make_adyen_bizum_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs | crate: test_utils | connector: adyen_uk_ui
async fn should_make_adyen_alipay_hk_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs | crate: test_utils | connector: adyen_uk_ui
async fn should_make_adyen_gpay_zero_dollar_mandate_payment(
web_driver: WebDriver,
) -> Result<(), WebDriverError> {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs | crate: test_utils | connector: adyen_uk_ui
async fn should_make_adyen_gpay_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs | crate: test_utils | connector: adyen_uk_ui
async fn should_make_adyen_3ds_mandate_with_zero_dollar_payment(
web_driver: WebDriver,
) -> Result<(), WebDriverError> {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs | crate: test_utils | connector: adyen_uk_ui
async fn should_make_adyen_3ds_mandate_payment(
web_driver: WebDriver,
) -> Result<(), WebDriverError> {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
// file: hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs | crate: test_utils | connector: adyen_uk_ui
async fn should_make_adyen_3ds_payment_success(
web_driver: WebDriver,
) -> Result<(), WebDriverError> {
let conn = AdyenSeleniumTest {};
conn.make_redirection_payment(
web_driver,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/62"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Trigger(Trigger::SwitchFrame(By::Name("threeDSIframe"))),
Event::Assert(Assert::IsPresent("AUTHENTICATION DETAILS")),
Event::Trigger(Trigger::SendKeys(By::ClassName("input-field"), "password")),
Event::Trigger(Trigger::Click(By::Id("buttonSubmit"))),
Event::Trigger(Trigger::Sleep(5)),
Event::Assert(Assert::IsPresent("succeeded")),
],
)
.await?;
Ok(())
} | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs | crate: test_utils | connector: adyen_uk_ui
async fn should_make_adyen_3ds_payment_failed(web_driver: WebDriver) -> Result<(), WebDriverError> {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/stripe_ui.rs | crate: test_utils | connector: stripe_ui
async fn should_make_stripe_klarna_payment(c: WebDriver) -> Result<(), WebDriverError> {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/stripe_ui.rs | crate: test_utils | connector: stripe_ui
fn should_make_stripe_sofort_redirect_payment_test() {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/stripe_ui.rs | crate: test_utils | connector: stripe_ui
fn should_make_stripe_bancontact_card_redirect_payment_test() {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/stripe_ui.rs | crate: test_utils | connector: stripe_ui
async fn should_make_afterpay_payment(c: WebDriver) -> Result<(), WebDriverError> {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/stripe_ui.rs | crate: test_utils | connector: stripe_ui
fn should_make_stripe_affirm_paylater_payment_test() {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/stripe_ui.rs | crate: test_utils | connector: stripe_ui
fn should_make_stripe_sepa_bank_debit_payment_test() {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/stripe_ui.rs | crate: test_utils | connector: stripe_ui
fn should_make_stripe_ach_bank_debit_payment_test() {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/stripe_ui.rs | crate: test_utils | connector: stripe_ui
fn should_make_stripe_p24_redirect_payment_test() {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/stripe_ui.rs | crate: test_utils | connector: stripe_ui
fn should_make_stripe_eps_bank_redirect_payment_test() {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/stripe_ui.rs | crate: test_utils | connector: stripe_ui
fn should_make_stripe_giropay_bank_redirect_payment_test() {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/stripe_ui.rs | crate: test_utils | connector: stripe_ui
fn should_make_stripe_ideal_bank_redirect_payment_test() {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/stripe_ui.rs | crate: test_utils | connector: stripe_ui
fn should_make_stripe_alipay_payment_test() {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/stripe_ui.rs | crate: test_utils | connector: stripe_ui
fn should_make_afterpay_payment_test() {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/stripe_ui.rs | crate: test_utils | connector: stripe_ui
fn should_make_stripe_klarna_payment_test() {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/stripe_ui.rs | crate: test_utils | connector: stripe_ui
fn should_make_gpay_mandate_payment_test() {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/stripe_ui.rs | crate: test_utils | connector: stripe_ui
fn should_make_3ds_mandate_with_zero_dollar_payment_test() {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/stripe_ui.rs | crate: test_utils | connector: stripe_ui
fn should_fail_recurring_payment_due_to_authentication_test() {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/stripe_ui.rs | crate: test_utils | connector: stripe_ui
fn should_make_3ds_mandate_payment_test() {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/stripe_ui.rs | crate: test_utils | connector: stripe_ui
async fn should_make_stripe_affirm_paylater_payment(
driver: WebDriver,
) -> Result<(), WebDriverError> {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/stripe_ui.rs | crate: test_utils | connector: stripe_ui
async fn should_make_stripe_sepa_bank_debit_payment(c: WebDriver) -> Result<(), WebDriverError> {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/stripe_ui.rs | crate: test_utils | connector: stripe_ui
async fn should_make_stripe_ach_bank_debit_payment(c: WebDriver) -> Result<(), WebDriverError> {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/stripe_ui.rs | crate: test_utils | connector: stripe_ui
async fn should_make_stripe_sofort_redirect_payment(c: WebDriver) -> Result<(), WebDriverError> {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/stripe_ui.rs | crate: test_utils | connector: stripe_ui
async fn should_make_stripe_p24_redirect_payment(c: WebDriver) -> Result<(), WebDriverError> {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/stripe_ui.rs | crate: test_utils | connector: stripe_ui
async fn should_make_stripe_bancontact_card_redirect_payment(
c: WebDriver,
) -> Result<(), WebDriverError> {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/stripe_ui.rs | crate: test_utils | connector: stripe_ui
async fn should_make_stripe_eps_bank_redirect_payment(c: WebDriver) -> Result<(), WebDriverError> {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/stripe_ui.rs | crate: test_utils | connector: stripe_ui
async fn should_make_stripe_giropay_bank_redirect_payment(
c: WebDriver,
) -> Result<(), WebDriverError> {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/stripe_ui.rs | crate: test_utils | connector: stripe_ui
async fn should_make_stripe_ideal_bank_redirect_payment(
c: WebDriver,
) -> Result<(), WebDriverError> {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/stripe_ui.rs | crate: test_utils | connector: stripe_ui
async fn should_make_stripe_alipay_payment(c: WebDriver) -> Result<(), WebDriverError> {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
// file: hyperswitch/crates/test_utils/tests/connectors/stripe_ui.rs | crate: test_utils | connector: stripe_ui
async fn should_make_afterpay_payment(c: WebDriver) -> Result<(), WebDriverError> {
let conn = StripeSeleniumTest {};
conn.make_redirection_payment(
c,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/22"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Trigger(Trigger::Click(By::Css(
"a[class='common-Button common-Button--default']",
))),
Event::Assert(Assert::IsPresent("Google")),
Event::Assert(Assert::Contains(
Selector::QueryParamStr,
"status=succeeded",
)),
],
)
.await?;
Ok(())
} | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/stripe_ui.rs | crate: test_utils | connector: stripe_ui
async fn should_make_gpay_mandate_payment(c: WebDriver) -> Result<(), WebDriverError> {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/stripe_ui.rs | crate: test_utils | connector: stripe_ui
async fn should_make_3ds_mandate_with_zero_dollar_payment(
c: WebDriver,
) -> Result<(), WebDriverError> {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/stripe_ui.rs | crate: test_utils | connector: stripe_ui
async fn should_fail_recurring_payment_due_to_authentication(
c: WebDriver,
) -> Result<(), WebDriverError> {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/tests/connectors/stripe_ui.rs | crate: test_utils | connector: stripe_ui
async fn should_make_3ds_mandate_payment(c: WebDriver) -> Result<(), WebDriverError> {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/src/connector_auth.rs | crate: test_utils
use std::{collections::HashMap, env};
use masking::Secret;
use serde::{Deserialize, Serialize};
pub fn new() -> Self {
{
(Some(api_key), None, None, None) => ConnectorAuthType::HeaderKey {
api_key: Secret::new(
api_key.as_str().unwrap_or_default().to_string(),
),
},<|fim_suffix|>
<|fim_middle|>
_ => ConnectorAuthType::NoKey,
}
} | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/src/connector_auth.rs | crate: test_utils
fn from(key: MultiAuthKey) -> Self {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/src/connector_auth.rs | crate: test_utils
fn from(key: SignatureKey) -> Self {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/src/connector_auth.rs | crate: test_utils
fn from(key: BodyKey) -> Self {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/src/connector_auth.rs | crate: test_utils
fn from(key: HeaderKey) -> Self {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/test_utils/src/connector_auth.rs | crate: test_utils
use std::{collections::HashMap, env};
pub fn inner(&self) -> &HashMap<String, ConnectorAuthType> {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
// file: hyperswitch/crates/test_utils/src/connector_auth.rs | crate: test_utils
fn default() -> Self {
Self::new()
} | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/euclid_wasm/src/utils.rs | crate: euclid_wasm
fn err_to_js(self) -> Result<T, JsValue> {
{
Ok(t) => Ok(t),<|fim_suffix|>
<|fim_middle|>
Err(e) => Err(serde_wasm_bindgen::to_value(&e)?),
}
} | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/euclid_wasm/src/utils.rs | crate: euclid_wasm
fn err_to_js(self) -> Result<T, JsValue> {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_types/src/payment_methods.rs | crate: common_types
fn from(helper: PaymentMethodsEnabledHelper) -> Self {
{
PaymentMethodsEnabledHelper::V2 {
payment_method_type,
payment_method_subtypes,
} => Self {
payment_method_type,
payment_method_subtypes,
},<|fim_suffix|>
<|fim_middle|>
PaymentMethodsEnabledHelper::V1 {
payment_method,
payment_method_types,
} => Self {
payment_method_type: payment_method,
payment_method_subtypes: payment_method_types.map(|subtypes| {
subtypes
.into_iter()
.map(RequestPaymentMethodTypes::from)
.collect()
}),
},
}
} | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_types/src/payment_methods.rs | crate: common_types
///Get payment_method_subtype
pub fn get_payment_method_type(&self) -> Option<common_enums::PaymentMethodType> {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_types/src/payment_methods.rs | crate: common_types
fn from(value: RequestPaymentMethodTypesV1) -> Self {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_types/src/payment_methods.rs | crate: common_types
pub fn get_payment_method_type(&self) -> Option<&Vec<RequestPaymentMethodTypes>> {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_types/src/payment_methods.rs | crate: common_types
pub fn get_payment_method(&self) -> Option<common_enums::PaymentMethod> {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
// file: hyperswitch/crates/common_types/src/payment_methods.rs | crate: common_types
fn from(helper: PaymentMethodsEnabledHelper) -> Self {
match helper {
PaymentMethodsEnabledHelper::V2 {
payment_method_type,
payment_method_subtypes,
} => Self {
payment_method_type,
payment_method_subtypes,
},
PaymentMethodsEnabledHelper::V1 {
payment_method,
payment_method_types,
} => Self {
payment_method_type: payment_method,
payment_method_subtypes: payment_method_types.map(|subtypes| {
subtypes
.into_iter()
.map(RequestPaymentMethodTypes::from)
.collect()
}),
},
}
} | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_types/src/payment_methods.rs | crate: common_types
use diesel::{
backend::Backend,
deserialize,
deserialize::FromSql,
serialize::ToSql,
sql_types::{Json, Jsonb},
AsExpression, Queryable,
};
fn to_sql<'b>(
&'b self,
out: &mut diesel::serialize::Output<'b, '_, diesel::pg::Pg>,
) -> diesel::serialize::Result {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_types/src/payment_methods.rs | crate: common_types
use diesel::{
backend::Backend,
deserialize,
deserialize::FromSql,
serialize::ToSql,
sql_types::{Json, Jsonb},
AsExpression, Queryable,
};
fn from_sql(bytes: <diesel::pg::Pg as Backend>::RawValue<'_>) -> deserialize::Result<Self> {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_types/src/primitive_wrappers.rs | crate: common_types
/// Default for `ShouldCollectCvvDuringPayment` is `true`
fn default() -> Self {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
// file: hyperswitch/crates/common_types/src/primitive_wrappers.rs | crate: common_types
/// Default for `ShouldCollectCvvDuringPayment` is `true`
fn default() -> Self {
Self(true)
} | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/common_types/src/primitive_wrappers.rs | crate: common_types
pub use bool_wrappers::*;
/// returns the inner bool value
pub fn is_true(&self) -> bool {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/config_importer/src/main.rs | crate: config_importer
use std::io::{BufWriter, Write};
type EnvironmentVariableMap = std::collections::HashMap<String, String>;
type EnvironmentVariableMap = indexmap::IndexMap<String, String>;
fn process_toml_value(
prefix: impl std::fmt::Display + Clone,
key: impl std::fmt::Display + Clone,
value: &toml::Value,
) -> Vec<(String, String)> {
{
toml::Value::String(s) => vec![(key_with_prefix, s.to_owned())],
toml::Value::Integer(i) => vec![(key_with_prefix, i.to_string())],<|fim_suffix|>
<|fim_middle|>
toml::Value::Array(values) => {
if values.is_empty() {
return vec![(key_with_prefix, String::new())];
}
// This logic does not support / account for arrays of tables or arrays of arrays.
let (_processed_keys, processed_values) = values
.iter()
.flat_map(|v| process_toml_value(prefix.clone(), key.clone(), v))
.unzip::<_, _, Vec<String>, Vec<String>>();
vec![(key_with_prefix, processed_values.join(","))]
}
toml::Value::Table(map) => map
.into_iter()
.flat_map(|(k, v)| process_toml_value(key_with_prefix.clone(), k, v))
.collect(),
}
} | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/config_importer/src/main.rs | crate: config_importer
use std::io::{BufWriter, Write};
use anyhow::Context;
type EnvironmentVariableMap = std::collections::HashMap<String, String>;
type EnvironmentVariableMap = indexmap::IndexMap<String, String>;
fn main() -> anyhow::Result<()> {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/config_importer/src/main.rs | crate: config_importer
use std::io::{BufWriter, Write};
type EnvironmentVariableMap = std::collections::HashMap<String, String>;
type EnvironmentVariableMap = indexmap::IndexMap<String, String>;
fn process_toml_value(
prefix: impl std::fmt::Display + Clone,
key: impl std::fmt::Display + Clone,
value: &toml::Value,
) -> Vec<(String, String)> {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/cards/tests/basic.rs | crate: cards
use cards::{CardExpiration, CardExpirationMonth, CardExpirationYear, CardSecurityCode};
use common_utils::date_time;
fn test_card_expiration() {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/cards/tests/basic.rs | crate: cards
use cards::{CardExpiration, CardExpirationMonth, CardExpirationYear, CardSecurityCode};
use common_utils::date_time;
fn test_card_expiration() {
{let curr_date = date_time::now();<|fim_suffix|>
<|fim_middle|>
assert!(invalid_deserialization.is_err());}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/cards/tests/basic.rs | crate: cards
use cards::{CardExpiration, CardExpirationMonth, CardExpirationYear, CardSecurityCode};
fn test_card_expiration_month() {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/cards/tests/basic.rs | crate: cards
use cards::{CardExpiration, CardExpirationMonth, CardExpirationYear, CardSecurityCode};
use common_utils::date_time;
fn test_card_expiration_year() {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
// file: hyperswitch/crates/cards/tests/basic.rs | crate: cards
use cards::{CardExpiration, CardExpirationMonth, CardExpirationYear, CardSecurityCode};
fn test_card_expiration_month() {
// no panic
let card_exp_month = CardExpirationMonth::try_from(12).unwrap();
// will panic on unwrap
let invalid_card_exp_month = CardExpirationMonth::try_from(13);
assert_eq!(*card_exp_month.peek(), 12);
assert!(invalid_card_exp_month.is_err());
let serialized = serde_json::to_string(&card_exp_month).unwrap();
assert_eq!(serialized, "12");
let derialized = serde_json::from_str::<CardExpirationMonth>(&serialized).unwrap();
assert_eq!(*derialized.peek(), 12);
let invalid_deserialization = serde_json::from_str::<CardExpirationMonth>("13");
assert!(invalid_deserialization.is_err());
} | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/cards/tests/basic.rs | crate: cards
use cards::{CardExpiration, CardExpirationMonth, CardExpirationYear, CardSecurityCode};
fn test_card_security_code() {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.