mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-03 05:17:02 +08:00
fix(router): decrease payment method token time based on payment_intent creation time (#1682)
Co-authored-by: Sahkal Poddar <sahkal.poddar@juspay.in> Co-authored-by: Arun Raj M <jarnura47@gmail.com>
This commit is contained in:
@ -9,7 +9,7 @@ use crate::{
|
||||
core::{customers, payment_methods::cards},
|
||||
routes,
|
||||
services::{api, authentication as auth},
|
||||
types::api::customers as customer_types,
|
||||
types::api::{customers as customer_types, payment_methods},
|
||||
};
|
||||
|
||||
#[instrument(skip_all, fields(flow = ?Flow::CustomersCreate))]
|
||||
@ -168,9 +168,10 @@ pub async fn list_customer_payment_method_api(
|
||||
state: web::Data<routes::AppState>,
|
||||
req: HttpRequest,
|
||||
path: web::Path<String>,
|
||||
json_payload: web::Query<payment_methods::PaymentMethodListRequest>,
|
||||
) -> HttpResponse {
|
||||
let customer_id = path.into_inner();
|
||||
|
||||
let payload = json_payload.into_inner();
|
||||
let flow = Flow::CustomerPaymentMethodsList;
|
||||
|
||||
wrap::compatibility_api_wrap::<
|
||||
@ -186,9 +187,15 @@ pub async fn list_customer_payment_method_api(
|
||||
flow,
|
||||
state.get_ref(),
|
||||
&req,
|
||||
customer_id.as_ref(),
|
||||
payload,
|
||||
|state, auth, req| {
|
||||
cards::list_customer_payment_method(state, auth.merchant_account, auth.key_store, req)
|
||||
cards::list_customer_payment_method(
|
||||
state,
|
||||
auth.merchant_account,
|
||||
auth.key_store,
|
||||
req,
|
||||
&customer_id,
|
||||
)
|
||||
},
|
||||
&auth::ApiKeyAuth,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user