feat: Apple pay session flow integrate (#138)

This commit is contained in:
Sangamesh Kulkarni
2022-12-14 17:59:27 +05:30
committed by GitHub
parent 1f0d1deb2b
commit 8b8ff8188f
29 changed files with 495 additions and 33 deletions

View File

@ -321,6 +321,7 @@ pub async fn create_payment_connector(
payment_methods_enabled,
test_mode: req.test_mode,
disabled: req.disabled,
metadata: req.metadata,
};
let mca = store

View File

@ -234,6 +234,8 @@ pub enum ApiClientError {
InvalidProxyConfiguration,
#[error("Client construction failed")]
ClientConstructionFailed,
#[error("Certificate decode failed")]
CertificateDecodeFailed,
#[error("URL encoding of request payload failed")]
UrlEncodingFailed,
@ -295,6 +297,12 @@ pub enum ConnectorError {
MissingRequiredField { field_name: String },
#[error("Failed to obtain authentication type")]
FailedToObtainAuthType,
#[error("Failed to obtain certificate")]
FailedToObtainCertificate,
#[error("Connector meta data not found")]
NoConnectorMetaData,
#[error("Failed to obtain certificate key")]
FailedToObtainCertificateKey,
#[error("This step has not been implemented for: {0}")]
NotImplemented(String),
#[error("Missing connector transaction ID")]

View File

@ -183,7 +183,6 @@ where
Op: Operation<F, Req> + Send + Sync + Clone,
Req: Debug,
Res: transformers::ToResponse<Req, PaymentData<F>, Op> + From<Req>,
// To create connector flow specific interface data
PaymentData<F>: ConstructFlowSpecificData<F, FData, types::PaymentsResponseData>,
types::RouterData<F, FData, types::PaymentsResponseData>: Feature<F, FData>,

View File

@ -95,7 +95,7 @@ where
.payment_attempt
.authentication_type
.unwrap_or_default(),
connector_meta_data: merchant_connector_account.metadata,
request: T::try_from(payment_data.clone())?,
response: response.map_or_else(|| Err(types::ErrorResponse::default()), Ok),
};

View File

@ -71,6 +71,7 @@ pub async fn construct_refund_router_data<'a, F>(
// Does refund need shipping/billing address ?
address: PaymentAddress::default(),
auth_type: payment_attempt.authentication_type.unwrap_or_default(),
connector_meta_data: None,
request: types::RefundsData {
refund_id: refund.refund_id.clone(),