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:
Kashif
2024-06-25 19:37:10 +05:30
committed by GitHub
parent 7c639bf878
commit 9e4b2d1c11
92 changed files with 4442 additions and 199 deletions

View File

@ -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,
}
}
}

View File

@ -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) => {