mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-03 21:37:41 +08:00
feat(payment_methods_v2): Payment method Create API (#5812)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -489,7 +489,18 @@ async fn store_bank_details_in_payment_methods(
|
||||
.await
|
||||
.change_context(ApiErrorResponse::InternalServerError)
|
||||
.attach_printable("Unable to encrypt customer details")?;
|
||||
|
||||
#[cfg(all(
|
||||
any(feature = "v1", feature = "v2"),
|
||||
not(feature = "payment_methods_v2")
|
||||
))]
|
||||
let pm_id = generate_id(consts::ID_LENGTH, "pm");
|
||||
|
||||
#[cfg(all(feature = "v2", feature = "payment_methods_v2"))]
|
||||
let pm_id = common_utils::id_type::GlobalPaymentMethodId::generate("random_cell_id")
|
||||
.change_context(errors::ApiErrorResponse::InternalServerError)
|
||||
.attach_printable("Unable to generate GlobalPaymentMethodId")?;
|
||||
|
||||
let now = common_utils::date_time::now();
|
||||
#[cfg(all(
|
||||
any(feature = "v1", feature = "v2"),
|
||||
|
||||
Reference in New Issue
Block a user