feat(connector): Cybersource Authorize (#154)

Co-authored-by: Arun Raj M <jarnura47@gmail.com>
This commit is contained in:
Sahebjot singh
2022-12-24 15:09:49 +05:30
committed by GitHub
parent e7579a4819
commit 6123823523
26 changed files with 658 additions and 7 deletions

View File

@ -469,6 +469,7 @@ where
pub refunds: Vec<storage::Refund>,
pub sessions_token: Vec<api::SessionToken>,
pub card_cvc: Option<pii::Secret<String>>,
pub email: Option<masking::Secret<String, pii::Email>>,
}
#[derive(Debug)]

View File

@ -113,6 +113,7 @@ impl<F: Send + Clone> GetTracker<F, PaymentData<F>, api::PaymentsCancelRequest>
payment_attempt,
currency,
amount,
email: None,
mandate_id: None,
setup_mandate: None,
token: None,

View File

@ -125,6 +125,7 @@ impl<F: Send + Clone> GetTracker<F, payments::PaymentData<F>, api::PaymentsCaptu
currency,
force_sync: None,
amount,
email: None,
mandate_id: None,
setup_mandate: None,
token: None,

View File

@ -142,6 +142,7 @@ impl<F: Send + Clone> GetTracker<F, PaymentData<F>, api::PaymentsRequest> for Pa
currency,
connector_response,
amount,
email: request.email.clone(),
mandate_id: None,
setup_mandate,
token,

View File

@ -214,6 +214,7 @@ impl<F: Send + Clone> GetTracker<F, PaymentData<F>, api::PaymentsRequest> for Pa
payment_attempt,
currency,
amount,
email: request.email.clone(),
mandate_id,
setup_mandate,
token,

View File

@ -136,6 +136,7 @@ impl<F: Send + Clone> GetTracker<F, PaymentData<F>, api::VerifyRequest> for Paym
/// currency and amount are irrelevant in this scenario
currency: storage_enums::Currency::default(),
amount: api::Amount::Zero,
email: None,
mandate_id: None,
setup_mandate: request.mandate_data.clone(),
token: request.payment_token.clone(),

View File

@ -13,6 +13,7 @@ use crate::{
payments::{self, helpers, operations, PaymentData},
},
db::StorageInterface,
pii,
pii::Secret,
routes::AppState,
types::{
@ -131,6 +132,7 @@ impl<F: Send + Clone> GetTracker<F, PaymentData<F>, api::PaymentsSessionRequest>
payment_attempt,
currency,
amount,
email: None::<Secret<String, pii::Email>>,
mandate_id: None,
token: None,
setup_mandate: None,

View File

@ -12,6 +12,7 @@ use crate::{
payments::{helpers, operations, CustomerDetails, PaymentAddress, PaymentData},
},
db::StorageInterface,
pii,
pii::Secret,
routes::AppState,
types::{
@ -128,6 +129,7 @@ impl<F: Send + Clone> GetTracker<F, PaymentData<F>, api::PaymentsStartRequest> f
payment_intent,
currency,
amount,
email: None::<Secret<String, pii::Email>>,
mandate_id: None,
connector_response,
setup_mandate: None,

View File

@ -275,6 +275,7 @@ async fn get_tracker_for_sync<
connector_response,
currency,
amount,
email: None,
mandate_id: None,
setup_mandate: None,
token: None,

View File

@ -164,6 +164,7 @@ impl<F: Send + Clone> GetTracker<F, PaymentData<F>, api::PaymentsRequest> for Pa
payment_attempt,
currency,
amount,
email: request.email.clone(),
mandate_id,
token,
setup_mandate,

View File

@ -433,6 +433,7 @@ impl<F: Clone> TryFrom<PaymentData<F>> for types::PaymentsAuthorizeData {
amount: payment_data.amount.into(),
currency: payment_data.currency,
browser_info,
email: payment_data.email,
order_details,
})
}