mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 09:07:09 +08:00
refactor(RouterData): rename orca_return_url to router_return_url (#311)
This commit is contained in:
@ -386,9 +386,9 @@ impl TryFrom<&types::PaymentsAuthorizeRouterData> for AdyenPaymentRequest {
|
||||
merchant_account: auth_type.merchant_account,
|
||||
payment_method,
|
||||
reference,
|
||||
return_url: item.orca_return_url.clone().ok_or(
|
||||
return_url: item.router_return_url.clone().ok_or(
|
||||
errors::ConnectorError::MissingRequiredField {
|
||||
field_name: "orca_return_url".into(),
|
||||
field_name: "router_return_url".into(),
|
||||
},
|
||||
)?,
|
||||
shopper_interaction,
|
||||
|
||||
@ -94,11 +94,11 @@ impl TryFrom<&types::PaymentsAuthorizeRouterData> for PaymentsRequest {
|
||||
|
||||
let return_url = ReturnUrl {
|
||||
success_url: item
|
||||
.orca_return_url
|
||||
.router_return_url
|
||||
.as_ref()
|
||||
.map(|return_url| format!("{return_url}?status=success")),
|
||||
failure_url: item
|
||||
.orca_return_url
|
||||
.router_return_url
|
||||
.as_ref()
|
||||
.map(|return_url| format!("{return_url}?status=failure")),
|
||||
};
|
||||
|
||||
@ -240,7 +240,7 @@ impl TryFrom<&types::PaymentsAuthorizeRouterData> for PaymentIntentRequest {
|
||||
metadata_txn_id,
|
||||
metadata_txn_uuid,
|
||||
return_url: item
|
||||
.orca_return_url
|
||||
.router_return_url
|
||||
.clone()
|
||||
.unwrap_or_else(|| "https://juspay.in/".to_string()),
|
||||
confirm: true, // Stripe requires confirm to be true if return URL is present
|
||||
|
||||
@ -77,7 +77,7 @@ pub fn mk_add_card_request(
|
||||
merchant_id: "m0010", // [#253]: Need mapping for application mid to lockeId
|
||||
email_address: Some("dummy@gmail.com".to_string().into()), //
|
||||
name_on_card: Some("juspay".to_string().into()), // [#256]
|
||||
nickname: Some("orca".to_string()), //
|
||||
nickname: Some("router".to_string()), //
|
||||
};
|
||||
let body = utils::Encode::<AddCardRequest<'_>>::encode(&add_card_req)
|
||||
.change_context(errors::CardVaultError::RequestEncodingFailed)?;
|
||||
|
||||
@ -68,7 +68,7 @@ where
|
||||
mandate_reference: None,
|
||||
});
|
||||
|
||||
let orca_return_url = Some(helpers::create_redirect_url(
|
||||
let router_return_url = Some(helpers::create_redirect_url(
|
||||
&state.conf.server,
|
||||
&payment_data.payment_attempt,
|
||||
&merchant_connector_account.connector_name,
|
||||
@ -84,7 +84,7 @@ where
|
||||
connector_auth_type: auth_type,
|
||||
description: payment_data.payment_intent.description.clone(),
|
||||
return_url: payment_data.payment_intent.return_url.clone(),
|
||||
orca_return_url,
|
||||
router_return_url,
|
||||
payment_method_id: payment_data.payment_attempt.payment_method_id.clone(),
|
||||
address: payment_data.address.clone(),
|
||||
auth_type: payment_data
|
||||
|
||||
@ -71,7 +71,7 @@ pub async fn construct_refund_router_data<'a, F>(
|
||||
connector_auth_type: auth_type,
|
||||
description: None,
|
||||
return_url: payment_intent.return_url.clone(),
|
||||
orca_return_url: None,
|
||||
router_return_url: None,
|
||||
payment_method_id: payment_attempt.payment_method_id.clone(),
|
||||
// Does refund need shipping/billing address ?
|
||||
address: PaymentAddress::default(),
|
||||
|
||||
@ -74,7 +74,7 @@ pub struct RouterData<Flow, Request, Response> {
|
||||
pub connector_auth_type: ConnectorAuthType,
|
||||
pub description: Option<String>,
|
||||
pub return_url: Option<String>,
|
||||
pub orca_return_url: Option<String>,
|
||||
pub router_return_url: Option<String>,
|
||||
pub address: PaymentAddress,
|
||||
pub auth_type: storage_enums::AuthenticationType,
|
||||
pub connector_meta_data: Option<serde_json::Value>,
|
||||
|
||||
Reference in New Issue
Block a user