mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-03 21:37:41 +08:00
refactor(router): added a new type minor unit to amount (#4629)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: Hrithikesh <61539176+hrithikesh026@users.noreply.github.com>
This commit is contained in:
@ -213,7 +213,7 @@ where
|
||||
};
|
||||
|
||||
let payment_input = dsl_inputs::PaymentInput {
|
||||
amount: payment_data.payment_intent.amount,
|
||||
amount: payment_data.payment_intent.amount.get_amount_as_i64(),
|
||||
card_bin: payment_data
|
||||
.payment_method_data
|
||||
.as_ref()
|
||||
@ -897,7 +897,7 @@ pub async fn perform_session_flow_routing(
|
||||
};
|
||||
|
||||
let payment_input = dsl_inputs::PaymentInput {
|
||||
amount: session_input.payment_intent.amount,
|
||||
amount: session_input.payment_intent.amount.get_amount_as_i64(),
|
||||
currency: session_input
|
||||
.payment_intent
|
||||
.currency
|
||||
@ -1142,7 +1142,7 @@ pub fn make_dsl_input_for_surcharge(
|
||||
payment_type: None,
|
||||
};
|
||||
let payment_input = dsl_inputs::PaymentInput {
|
||||
amount: payment_attempt.amount,
|
||||
amount: payment_attempt.amount.get_amount_as_i64(),
|
||||
// currency is always populated in payment_attempt during payment create
|
||||
currency: payment_attempt
|
||||
.currency
|
||||
|
||||
Reference in New Issue
Block a user