mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-01 11:06:50 +08:00
refactor: separate DB queries and HTML creation for payout links (#4967)
Signed-off-by: Chikke Srujan <chikke.srujan@Chikke-Srujan-C02FC60MMD6M.local> Signed-off-by: chikke srujan <121822803+srujanchikke@users.noreply.github.com> Signed-off-by: Chikke Srujan <chikke.srujan@Chikke-Srujan-G961M60MK7.local> Co-authored-by: chikke srujan <121822803+srujanchikke@users.noreply.github.com> Co-authored-by: Chikke Srujan <chikke.srujan@Chikke-Srujan-C02FC60MMD6M.local> Co-authored-by: Srujan chikke <chikke.srujan@juspay.in> Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: Chikke Srujan <chikke.srujan@Chikke-Srujan-G961M60MK7.local>
This commit is contained in:
@ -158,7 +158,8 @@ impl From<common_enums::PayoutStatus> for StripePayoutStatus {
|
||||
| common_enums::PayoutStatus::RequiresCreation
|
||||
| common_enums::PayoutStatus::RequiresFulfillment
|
||||
| common_enums::PayoutStatus::RequiresPayoutMethodData
|
||||
| common_enums::PayoutStatus::RequiresVendorAccountCreation => Self::PayoutProcessing,
|
||||
| common_enums::PayoutStatus::RequiresVendorAccountCreation
|
||||
| common_enums::PayoutStatus::RequiresConfirmation => Self::PayoutProcessing,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -140,6 +140,17 @@ where
|
||||
.map_into_boxed_body()
|
||||
}
|
||||
|
||||
Ok(api::ApplicationResponse::GenericLinkForm(boxed_generic_link_data)) => {
|
||||
let link_type = (boxed_generic_link_data).to_string();
|
||||
match services::generic_link_response::build_generic_link_html(*boxed_generic_link_data)
|
||||
{
|
||||
Ok(rendered_html) => api::http_response_html_data(rendered_html),
|
||||
Err(_) => {
|
||||
api::http_response_err(format!("Error while rendering {} HTML page", link_type))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ok(api::ApplicationResponse::PaymentLinkForm(boxed_payment_link_data)) => {
|
||||
match *boxed_payment_link_data {
|
||||
api::PaymentLinkAction::PaymentLinkFormData(payment_link_data) => {
|
||||
|
||||
Reference in New Issue
Block a user