mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 01:27:31 +08:00
fix(connector): [Rapyd] Add router_return_url in 3DS request (#1621)
This commit is contained in:
@ -4,6 +4,7 @@ use time::PrimitiveDateTime;
|
|||||||
use url::Url;
|
use url::Url;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
|
connector::utils::PaymentsAuthorizeRequestData,
|
||||||
consts,
|
consts,
|
||||||
core::errors,
|
core::errors,
|
||||||
pii::Secret,
|
pii::Secret,
|
||||||
@ -20,6 +21,8 @@ pub struct RapydPaymentsRequest {
|
|||||||
pub payment_method_options: Option<PaymentMethodOptions>,
|
pub payment_method_options: Option<PaymentMethodOptions>,
|
||||||
pub capture: Option<bool>,
|
pub capture: Option<bool>,
|
||||||
pub description: Option<String>,
|
pub description: Option<String>,
|
||||||
|
pub complete_payment_url: Option<String>,
|
||||||
|
pub error_payment_url: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Default, Debug, Serialize)]
|
#[derive(Default, Debug, Serialize)]
|
||||||
@ -125,6 +128,7 @@ impl TryFrom<&types::PaymentsAuthorizeRouterData> for RapydPaymentsRequest {
|
|||||||
.change_context(errors::ConnectorError::NotImplemented(
|
.change_context(errors::ConnectorError::NotImplemented(
|
||||||
"payment_method".to_owned(),
|
"payment_method".to_owned(),
|
||||||
))?;
|
))?;
|
||||||
|
let return_url = item.request.get_return_url()?;
|
||||||
Ok(Self {
|
Ok(Self {
|
||||||
amount: item.request.amount,
|
amount: item.request.amount,
|
||||||
currency: item.request.currency,
|
currency: item.request.currency,
|
||||||
@ -132,6 +136,8 @@ impl TryFrom<&types::PaymentsAuthorizeRouterData> for RapydPaymentsRequest {
|
|||||||
capture,
|
capture,
|
||||||
payment_method_options,
|
payment_method_options,
|
||||||
description: None,
|
description: None,
|
||||||
|
error_payment_url: Some(return_url.clone()),
|
||||||
|
complete_payment_url: Some(return_url),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user