text stringlengths 70 351k | source stringclasses 4
values |
|---|---|
// file: hyperswitch/crates/router/tests/connectors/nexinets.rs | crate: router | connector: nexinets | op: refund
use common_utils::types::MinorUnit;
use router::types::{self, domain, storage::enums, PaymentsAuthorizeData};
async fn should_refund_succeeded_payment_multiple_times() {
let captured_response = CONNECT... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/tests/connectors/nexinets.rs | crate: router | connector: nexinets
use router::types::{self, domain, storage::enums, PaymentsAuthorizeData};
fn payment_method_details() -> Option<PaymentsAuthorizeData> {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/tests/connectors/noon.rs | crate: router | connector: noon
use router::types::{self, storage::enums};
async fn should_fail_payment_for_incorrect_card_number() {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/thunes.rs | crate: router | connector: thunes
use masking::Secret;
async fn should_fail_payment_for_incorrect_expiry_year() {
let response = CONNECTOR
.make_payment(
Some(types::PaymentsAuthorizeData {
payment_method_data: api::... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/thunes.rs | crate: router | connector: thunes
use masking::Secret;
async fn should_fail_payment_for_incorrect_cvc() {
let response = CONNECTOR
.make_payment(
Some(types::PaymentsAuthorizeData {
payment_method_data: types::api::P... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/thunes.rs | crate: router | connector: thunes
use masking::Secret;
use crate::utils::{self, ConnectorActions};
fn get_data(&self) -> api::ConnectorData {
use router::connector::Thunes;
api::ConnectorData {
connector: Box::new(Thunes::new())... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/amazonpay.rs | crate: router | connector: amazonpay
use router::types::{self, api, storage::enums};
fn get_name(&self) -> String {
"amazonpay".to_string()
} | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/coinbase.rs | crate: router | connector: coinbase
use hyperswitch_domain_models::address::{Address, AddressDetails, PhoneDetails};
use masking::Secret;
use router::types::{self, api, domain, storage::enums, PaymentAddress};
use serde_json::json;
fn get_default_payment... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/tests/connectors/coinbase.rs | crate: router | connector: coinbase | op: cancel
use router::types::{self, api, domain, storage::enums, PaymentAddress};
async fn should_sync_cancelled_payment() {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/tests/connectors/coinbase.rs | crate: router | connector: coinbase | op: sync
use router::types::{self, api, domain, storage::enums, PaymentAddress};
async fn should_sync_expired_payment() {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/tests/connectors/coinbase.rs | crate: router | connector: coinbase | op: sync
use router::types::{self, api, domain, storage::enums, PaymentAddress};
async fn should_sync_unresolved_payment() {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/coinbase.rs | crate: router | connector: coinbase
use router::types::{self, api, domain, storage::enums, PaymentAddress};
fn get_name(&self) -> String {
"coinbase".to_string()
} | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/xendit.rs | crate: router | connector: xendit
use masking::Secret;
use router::{
types::{self, api, storage::enums,
}};
async fn should_fail_payment_for_invalid_exp_month() {
let response = CONNECTOR
.make_payment(
Some(types::PaymentsAutho... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/xendit.rs | crate: router | connector: xendit | op: authorize
use router::{
types::{self, api, storage::enums,
}};
async fn should_sync_authorized_payment() {
let authorize_response = CONNECTOR
.authorize_payment(payment_method_details(), get_default_p... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/tests/connectors/nomupay.rs | crate: router | connector: nomupay | op: payout
use api_models::payments::{Address, AddressDetails};
use masking::Secret;
use router::types::{self, api, storage::enums, PaymentAddress};
fn get_payout_info() -> Option<PaymentInfo> {
{<|fim_s... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/tests/connectors/nomupay.rs | crate: router | connector: nomupay | op: payout
use router::types::{self, api, storage::enums, PaymentAddress};
async fn should_create_and_fulfill_bacs_payout() {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/tests/connectors/nomupay.rs | crate: router | connector: nomupay | op: payout
use router::types::{self, api, storage::enums, PaymentAddress};
async fn should_create_payout_recipient() {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/nomupay.rs | crate: router | connector: nomupay
use router::types::{self, api, storage::enums, PaymentAddress};
use crate::utils::{self, ConnectorActions, PaymentInfo};
fn get_auth_token(&self) -> types::ConnectorAuthType {
utils::to_connector_auth_type(
... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/chargebee.rs | crate: router | connector: chargebee
use hyperswitch_domain_models::payment_method_data::{Card, PaymentMethodData};
use masking::Secret;
use router::types::{self, api, storage::enums};
async fn should_fail_payment_for_incorrect_expiry_year() {
let r... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/juspaythreedsserver.rs | crate: router | connector: juspaythreedsserver | op: authorize
use router::types::{self, api, storage::enums};
async fn should_only_authorize_payment() {
let response = CONNECTOR
.authorize_payment(payment_method_details(), get_def... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/juspaythreedsserver.rs | crate: router | connector: juspaythreedsserver
use router::types::{self, api, storage::enums};
use crate::utils::{self, ConnectorActions};
fn get_auth_token(&self) -> types::ConnectorAuthType {
utils::to_connector_auth_type(
... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/juspaythreedsserver.rs | crate: router | connector: juspaythreedsserver
fn new() -> Self {
Self
} | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/tests/connectors/cybersource.rs | crate: router | connector: cybersource | op: refund
use router::types::{self, api, domain, storage::enums};
async fn should_fail_refund_for_invalid_amount() {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/cybersource.rs | crate: router | connector: cybersource | op: refund
use router::types::{self, api, domain, storage::enums};
async fn should_refund_succeeded_payment() {
let connector = Cybersource {};
let response = connector
.make_payment_and_refund(... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/tests/connectors/cybersource.rs | crate: router | connector: cybersource | op: void
use router::types::{self, api, domain, storage::enums};
async fn should_fail_void_payment_for_reversed_payment() {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/tests/connectors/cybersource.rs | crate: router | connector: cybersource
use masking::Secret;
use router::types::{self, api, domain, storage::enums};
async fn should_fail_payment_for_invalid_exp_year() {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/tests/connectors/cybersource.rs | crate: router | connector: cybersource | op: authorize
use router::types::{self, api, domain, storage::enums};
async fn should_partially_capture_already_authorized_payment() {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/tests/connectors/dlocal.rs | crate: router | connector: dlocal
use hyperswitch_domain_models::address::{Address, AddressDetails};
use router::types::{self, api, domain, storage::enums, PaymentAddress};
pub fn get_payment_info() -> PaymentInfo {
{<|fim_suffix|>
<|fim_mid... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/dlocal.rs | crate: router | connector: dlocal
use router::types::{self, api, domain, storage::enums, PaymentAddress};
use crate::{
connector_auth,
utils::{self, ConnectorActions, PaymentInfo},
};
fn get_auth_token(&self) -> types::ConnectorAuthType {
u... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/datatrans.rs | crate: router | connector: datatrans
use router::types::{self, api, domain, storage::enums};
use crate::utils::{self, ConnectorActions};
fn get_auth_token(&self) -> types::ConnectorAuthType {
utils::to_connector_auth_type(
connector_... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/novalnet.rs | crate: router | connector: novalnet
use router::types::{self, api, storage::enums};
fn payment_method_details() -> Option<types::PaymentsAuthorizeData> {
None
} | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/novalnet.rs | crate: router | connector: novalnet
use router::types::{self, api, storage::enums};
fn get_name(&self) -> String {
"novalnet".to_string()
} | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/tests/connectors/cashtocode.rs | crate: router | connector: cashtocode | op: authorize
use router::types::{self, domain, storage::enums};
fn get_payment_authorize_data(
payment_method_type: Option<enums::PaymentMethodType>,
payment_method_data: domain::P... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/tests/connectors/cashtocode.rs | crate: router | connector: cashtocode
use router::types::{self, domain, storage::enums};
async fn should_fetch_pay_url_evoucher() {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/tests/connectors/cashtocode.rs | crate: router | connector: cashtocode
use router::types::{self, domain, storage::enums};
async fn should_fetch_pay_url_classic() {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/tests/connectors/cashtocode.rs | crate: router | connector: cashtocode
use hyperswitch_domain_models::address::{Address, AddressDetails};
use router::types::{self, domain, storage::enums};
fn get_payment_info() -> Option<utils::PaymentInfo> {
{<|fim_suffix|>
<|fim_middl... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/tests/connectors/bambora.rs | crate: router | connector: bambora | op: refund
use common_utils::types::MinorUnit;
use router::types::{self, domain, storage::enums};
async fn should_succeed_for_refund_amount_higher_than_payment_amount() {
{<|fim_suffix|>
<|fim_middle|>
}... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/bambora.rs | crate: router | connector: bambora | op: capture
use router::types::{self, domain, storage::enums};
async fn should_fail_void_payment_for_auto_capture() {
let authorize_response = CONNECTOR
.make_payment(get_default_payment_authorize_data(), N... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/bambora.rs | crate: router | connector: bambora | op: capture
use router::types::{self, domain, storage::enums};
async fn should_refund_manually_captured_payment() {
let response = CONNECTOR
.capture_payment_and_refund(get_default_payment_authorize_data(),... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/tests/connectors/bambora.rs | crate: router | connector: bambora | op: authorize
use common_utils::types::MinorUnit;
use masking::Secret;
use router::types::{self, domain, storage::enums};
fn get_default_payment_authorize_data() -> Option<types::PaymentsAuthorizeData> {... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/forte.rs | crate: router | connector: forte | op: refund
use std::{str::FromStr, time::Duration};
use common_utils::types::MinorUnit;
use router::types::{self, api, domain, storage::enums};
async fn should_sync_refund() {
let authorize_response = CONNECTOR
... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/forte.rs | crate: router | connector: forte | op: capture
use common_utils::types::MinorUnit;
use router::types::{self, api, domain, storage::enums};
async fn should_sync_auto_captured_payment() {
let authorize_response = CONNECTOR
.make_payment(get_paymen... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/tests/connectors/forte.rs | crate: router | connector: forte
use common_utils::types::MinorUnit;
use router::types::{self, api, domain, storage::enums};
async fn should_throw_not_implemented_for_unsupported_issuer() {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/forte.rs | crate: router | connector: forte | op: authorize
use router::types::{self, api, domain, storage::enums};
async fn should_only_authorize_payment() {
let response = CONNECTOR
.authorize_payment(get_payment_data(), get_default_payment_info())
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/tests/connectors/forte.rs | crate: router | connector: forte
use common_utils::types::MinorUnit;
use router::types::{self, api, domain, storage::enums};
fn get_payment_data() -> Option<types::PaymentsAuthorizeData> {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/forte.rs | crate: router | connector: forte
use common_utils::types::MinorUnit;
use router::types::{self, api, domain, storage::enums};
use crate::{
connector_auth,
utils::{self, ConnectorActions},
};
fn get_auth_token(&self) -> types::ConnectorAuthType {
... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/jpmorgan.rs | crate: router | connector: jpmorgan | op: capture
use router::types::{self, api, storage::enums};
async fn should_sync_manually_captured_refund() {
let refund_response = CONNECTOR
.capture_payment_and_refund(
payment_method_detail... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/jpmorgan.rs | crate: router | connector: jpmorgan
use router::types::{self, api, storage::enums};
use crate::utils::{self, ConnectorActions};
fn get_auth_token(&self) -> types::ConnectorAuthType {
utils::to_connector_auth_type(
connector_auth::Conn... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/tests/connectors/payu.rs | crate: router | connector: payu | op: refund
async fn should_fail_already_refunded_payment() {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/tests/connectors/payu.rs | crate: router | connector: payu | op: refund
use router::types::{self, domain, storage::enums, AccessToken, ConnectorAuthType};
async fn should_sync_succeeded_refund_payment() {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/tests/connectors/payu.rs | crate: router | connector: payu
use router::types::{self, domain, storage::enums, AccessToken, ConnectorAuthType};
fn get_access_token() -> Option<AccessToken> {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/tests/connectors/payu.rs | crate: router | connector: payu
use router::types::{self, domain, storage::enums, AccessToken, ConnectorAuthType};
use crate::{
connector_auth,
utils::{self, Connector, ConnectorActions, PaymentAuthorizeType},
};
fn get_auth_token(&sel... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/paybox.rs | crate: router | connector: paybox
use masking::Secret;
use router::types::{self, api, domain, storage::enums};
use crate::utils::{self, ConnectorActions};
fn get_data(&self) -> api::ConnectorData {
use router::connector::Paybox;
utils::cons... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/dummyconnector.rs | crate: router | connector: dummyconnector
use masking::Secret;
use router::types::{self, domain, storage::enums};
async fn should_fail_payment_for_incorrect_cvc() {
let response = CONNECTOR
.make_payment(
Some(types::Payment... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/paypal.rs | crate: router | connector: paypal | op: capture
use common_utils::types::MinorUnit;
use router::types::{self, domain, storage::enums, AccessToken, ConnectorAuthType};
async fn should_partially_refund_manually_captured_payment() {
let authorize_response... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/paypal.rs | crate: router | connector: paypal
use router::types::{self, domain, storage::enums, AccessToken, ConnectorAuthType};
async fn should_make_payment() {
let authorize_response = CONNECTOR
.make_payment(get_payment_data(), get_default_payment_info(... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/tests/connectors/fiserv.rs | crate: router | connector: fiserv
use router::types::{self, domain, storage::enums};
use serde_json::json;
fn get_connector_meta(&self) -> Option<serde_json::Value> {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/tests/connectors/multisafepay.rs | crate: router | connector: multisafepay
use hyperswitch_domain_models::address::{Address, AddressDetails};
use masking::Secret;
use router::types::{self, domain, storage::enums, PaymentAddress};
fn get_default_payment_info() -> Option<... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/multisafepay.rs | crate: router | connector: multisafepay
use router::types::{self, domain, storage::enums, PaymentAddress};
async fn should_make_payment() {
let authorize_response = CONNECTOR
.make_payment(None, get_default_payment_info())
.await
... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/multisafepay.rs | crate: router | connector: multisafepay | op: authorize
use router::types::{self, domain, storage::enums, PaymentAddress};
async fn should_partially_capture_authorized_payment() {
let response = CONNECTOR
.authorize_and_capture_payment(
... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/powertranz.rs | crate: router | connector: powertranz | op: capture
async fn should_fail_capture_for_invalid_payment() {
let capture_response = CONNECTOR
.capture_payment("123456789".to_string(), None, get_default_payment_info())
.await
.un... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/powertranz.rs | crate: router | connector: powertranz | op: refund
use router::types::{self, domain, storage::enums};
async fn should_partially_refund_succeeded_payment() {
let refund_response = CONNECTOR
.make_payment_and_refund(
payment_metho... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/powertranz.rs | crate: router | connector: powertranz | op: authorize
use router::types::{self, domain, storage::enums};
async fn should_capture_authorized_payment() {
let response = CONNECTOR
.authorize_and_capture_payment(payment_method_details(), None, ... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/deutschebank.rs | crate: router | connector: deutschebank | op: authorize
use router::types::{self, api, storage::enums};
async fn should_partially_capture_authorized_payment() {
let response = CONNECTOR
.authorize_and_capture_payment(
payment_... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/bitpay.rs | crate: router | connector: bitpay
use router::types::{self, api, domain, storage::enums, PaymentAddress};
fn get_name(&self) -> String {
"bitpay".to_string()
} | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/facilitapay.rs | crate: router | connector: facilitapay | op: refund
use router::types::{self, api, storage::enums};
async fn should_fail_for_refund_amount_higher_than_payment_amount() {
let response = CONNECTOR
.make_payment_and_refund(
paymen... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/facilitapay.rs | crate: router | connector: facilitapay | op: capture
use router::types::{self, api, storage::enums};
async fn should_refund_auto_captured_payment() {
let response = CONNECTOR
.make_payment_and_refund(payment_method_details(), None, get_def... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/facilitapay.rs | crate: router | connector: facilitapay
use router::types::{self, api, storage::enums};
fn get_name(&self) -> String {
"facilitapay".to_string()
} | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/plaid.rs | crate: router | connector: plaid
use masking::Secret;
use router::types::{self, api, domain, storage::enums};
async fn should_fail_payment_for_incorrect_cvc() {
let response = CONNECTOR
.make_payment(
Some(types::PaymentsAuthorizeDat... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/plaid.rs | crate: router | connector: plaid | op: authorize
use router::types::{self, api, domain, storage::enums};
async fn should_void_authorized_payment() {
let response = CONNECTOR
.authorize_and_void_payment(
payment_method_details(),
... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/plaid.rs | crate: router | connector: plaid
use router::types::{self, api, domain, storage::enums};
use crate::utils::{self, Connector, ConnectorActions};
fn get_auth_token(&self) -> types::ConnectorAuthType {
utils::to_connector_auth_type(
connect... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/plaid.rs | crate: router | connector: plaid
use masking::Secret;
use router::types::{self, api, domain, storage::enums};
use crate::utils::{self, Connector, ConnectorActions};
fn get_data(&self) -> api::ConnectorData {
use router::connector::Plaid;
uti... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/mifinity.rs | crate: router | connector: mifinity
use router::types::{self, domain, storage::enums};
fn get_name(&self) -> String {
"mifinity".to_string()
} | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/bankofamerica.rs | crate: router | connector: bankofamerica
use masking::Secret;
use router::types::{self, domain, storage::enums};
use crate::utils::{self, ConnectorActions};
fn get_data(&self) -> types::api::ConnectorData {
use router::connector::Bankofameri... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/square.rs | crate: router | connector: square | op: refund
use router::types::{self, storage::enums, PaymentsResponseData};
async fn should_sync_refund() {
let refund_response = CONNECTOR
.make_payment_and_refund(
payment_method_details(),
... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/square.rs | crate: router | connector: square | op: capture
use router::types::{self, storage::enums, PaymentsResponseData};
async fn should_refund_auto_captured_payment() {
let refund_response = CONNECTOR
.make_payment_and_refund(
payment_meth... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/tests/connectors/square.rs | crate: router | connector: square
use router::types::{self, storage::enums, PaymentsResponseData};
async fn create_token() -> Option<String> {
{
PaymentsResponseData::TokenizationResponse { token } => Some(token),<|fim_suffix|>
<|fim_middle|... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/tests/connectors/square.rs | crate: router | connector: square
fn get_default_payment_info(payment_method_token: Option<String>) -> Option<utils::PaymentInfo> {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/redsys.rs | crate: router | connector: redsys
use masking::Secret;
use router::types::{self, api, storage::enums};
use crate::utils::{self, ConnectorActions};
fn get_data(&self) -> api::ConnectorData {
use router::connector::Redsys;
utils::construct_co... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/stripebilling.rs | crate: router | connector: stripebilling
use router::types::{self, api, storage::enums};
fn get_name(&self) -> String {
"stripebilling".to_string()
} | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/globalpay.rs | crate: router | connector: globalpay | op: authorize
use router::types::{self, api, domain, storage::enums, AccessToken, ConnectorAuthType};
async fn should_sync_authorized_payment() {
let authorize_response = CONNECTOR
.authorize_payment(No... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/globalpay.rs | crate: router | connector: globalpay
use router::types::{self, api, domain, storage::enums, AccessToken, ConnectorAuthType};
fn get_name(&self) -> String {
"globalpay".to_string()
} | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/airwallex.rs | crate: router | connector: airwallex | op: capture
use router::types::{self, domain, storage::enums, AccessToken};
async fn should_fail_void_payment_for_auto_capture() {
let authorize_response = CONNECTOR
.make_payment(payment_method_details... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/stripe.rs | crate: router | connector: stripe | op: refund
use router::types::{self, domain, storage::enums};
async fn should_refund_succeeded_payment_multiple_times() {
let connector = Stripe {};
connector
.make_payment_and_multiple_refund(
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/tests/connectors/stripe.rs | crate: router | connector: stripe
use masking::Secret;
use router::types::{self, domain, storage::enums};
async fn should_fail_payment_for_invalid_card_cvc() {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/stripe.rs | crate: router | connector: stripe
use masking::Secret;
use router::types::{self, domain, storage::enums};
async fn should_fail_payment_for_invalid_exp_month() {
let response = Stripe {}
.make_payment(
Some(types::PaymentsAuthorizeDa... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/tests/connectors/stripe.rs | crate: router | connector: stripe | op: authorize
use router::types::{self, domain, storage::enums};
fn get_payment_authorize_data() -> Option<types::PaymentsAuthorizeData> {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/tests/connectors/rapyd.rs | crate: router | connector: rapyd | op: authorize
use router::types::{self, domain, storage::enums};
use crate::{
connector_auth,
utils::{self, ConnectorActions, PaymentInfo},
};
async fn voiding_already_authorized_payment_fails() {
<|... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/tests/connectors/rapyd.rs | crate: router | connector: rapyd | op: authorize
use masking::Secret;
use router::types::{self, domain, storage::enums};
use crate::{
connector_auth,
utils::{self, ConnectorActions, PaymentInfo},
};
async fn should_authorize_and_captu... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/shift4.rs | crate: router | connector: shift4 | op: capture
use router::types::{self, domain, storage::enums};
async fn should_partially_refund_manually_captured_payment() {
let connector = CONNECTOR;
let response = connector
.auth_capture_and_refund(
... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/shift4.rs | crate: router | connector: shift4
use masking::Secret;
use router::types::{self, domain, storage::enums};
async fn should_fail_payment_for_invalid_exp_month() {
let response = CONNECTOR
.make_payment(
Some(types::PaymentsAuthorizeDa... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/tests/connectors/shift4.rs | crate: router | connector: shift4
use masking::Secret;
use router::types::{self, domain, storage::enums};
async fn should_succeed_payment_for_incorrect_cvc() {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/shift4.rs | crate: router | connector: shift4 | op: authorize
use router::types::{self, domain, storage::enums};
async fn should_void_authorized_payment() {
let connector = CONNECTOR;
let response = connector
.authorize_and_void_payment(
No... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/cryptopay.rs | crate: router | connector: cryptopay
use router::types::{self, api, domain, storage::enums, PaymentAddress};
fn get_name(&self) -> String {
"cryptopay".to_string()
} | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/checkout.rs | crate: router | connector: checkout
use masking::Secret;
use router::types::{self, domain, storage::enums};
async fn should_fail_payment_for_invalid_exp_month() {
let response = CONNECTOR
.make_payment(
Some(types::PaymentsAuthori... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/nmi.rs | crate: router | connector: nmi | op: capture
use router::types::{self, domain, storage::enums};
async fn should_partially_refund_manually_captured_payment() {
let response = CONNECTOR
.authorize_payment(get_payment_authorize_data(), None)
... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/nmi.rs | crate: router | connector: nmi | op: authorize
use router::types::{self, domain, storage::enums};
async fn should_void_authorized_payment() {
let response = CONNECTOR
.authorize_payment(get_payment_authorize_data(), None)
.await
.u... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/nmi.rs | crate: router | connector: nmi | op: authorize
use router::types::{self, domain, storage::enums};
async fn should_partially_capture_authorized_payment() {
let response = CONNECTOR
.authorize_payment(get_payment_authorize_data(), None)
.awa... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/nmi.rs | crate: router | connector: nmi
use router::types::{self, domain, storage::enums};
async fn should_make_payment() {
let response = CONNECTOR
.make_payment(get_payment_authorize_data(), None)
.await
.unwrap();
assert_eq!(response... | ast_fragments |
// file: hyperswitch/crates/router/tests/connectors/nmi.rs | crate: router | connector: nmi | op: authorize
use router::types::{self, domain, storage::enums};
async fn should_only_authorize_payment() {
let response = CONNECTOR
.authorize_payment(get_payment_authorize_data(), None)
.await
.ex... | ast_fragments |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.