mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 12:15:40 +08:00
feat(connector): [Stripe] Add support for WeChat Pay and Qr code support in next action (#1555)
Co-authored-by: AkshayaFoiger <akshaya.shankar@juspay.in> Co-authored-by: chikke srujan <121822803+srujanchikke@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
ca4e242d20
commit
a15a77dea3
@ -9,6 +9,7 @@ use common_utils::{
|
||||
use masking::{PeekInterface, Secret};
|
||||
use router_derive::Setter;
|
||||
use time::PrimitiveDateTime;
|
||||
use url::Url;
|
||||
use utoipa::ToSchema;
|
||||
|
||||
use crate::{
|
||||
@ -177,7 +178,7 @@ pub struct PaymentsRequest {
|
||||
|
||||
/// The URL to redirect after the completion of the operation
|
||||
#[schema(value_type = Option<String>, example = "https://hyperswitch.io")]
|
||||
pub return_url: Option<url::Url>,
|
||||
pub return_url: Option<Url>,
|
||||
/// Indicates that you intend to make future payments with this Payment’s payment method. Providing this parameter will attach the payment method to the Customer, if present, after the Payment is confirmed and any required actions from the user are complete.
|
||||
#[schema(value_type = Option<FutureUsage>, example = "off_session")]
|
||||
pub setup_future_usage: Option<api_enums::FutureUsage>,
|
||||
@ -920,6 +921,8 @@ pub enum WalletData {
|
||||
SamsungPay(Box<SamsungPayWalletData>),
|
||||
/// The wallet data for WeChat Pay Redirection
|
||||
WeChatPayRedirect(Box<WeChatPayRedirection>),
|
||||
/// The wallet data for WeChat Pay
|
||||
WeChatPay(Box<WeChatPay>),
|
||||
}
|
||||
|
||||
#[derive(Eq, PartialEq, Clone, Debug, serde::Deserialize, serde::Serialize, ToSchema)]
|
||||
@ -959,6 +962,9 @@ pub struct ApplePayThirdPartySdkData {}
|
||||
#[derive(Eq, PartialEq, Clone, Debug, serde::Deserialize, serde::Serialize, ToSchema)]
|
||||
pub struct WeChatPayRedirection {}
|
||||
|
||||
#[derive(Eq, PartialEq, Clone, Debug, serde::Deserialize, serde::Serialize, ToSchema)]
|
||||
pub struct WeChatPay {}
|
||||
|
||||
#[derive(Eq, PartialEq, Clone, Debug, serde::Deserialize, serde::Serialize, ToSchema)]
|
||||
pub struct PaypalRedirection {}
|
||||
|
||||
@ -1229,8 +1235,13 @@ pub enum NextActionData {
|
||||
DisplayBankTransferInformation {
|
||||
bank_transfer_steps_and_charges_details: BankTransferNextStepsData,
|
||||
},
|
||||
/// contains third party sdk session token response
|
||||
/// Contains third party sdk session token response
|
||||
ThirdPartySdkSessionToken { session_token: Option<SessionToken> },
|
||||
/// Contains url for Qr code image, this qr code has to be shown in sdk
|
||||
QrCodeInformation {
|
||||
#[schema(value_type = String)]
|
||||
image_data_url: Url,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Eq, PartialEq, serde::Serialize, serde::Deserialize, ToSchema)]
|
||||
@ -1242,6 +1253,11 @@ pub struct BankTransferNextStepsData {
|
||||
pub receiver: ReceiverDetails,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, serde::Deserialize)]
|
||||
pub struct QrCodeNextStepsInstruction {
|
||||
pub image_data_url: Url,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Eq, PartialEq, serde::Serialize, serde::Deserialize, ToSchema)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum BankTransferInstructions {
|
||||
|
||||
Reference in New Issue
Block a user