mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-01 19:42:27 +08:00
fix: introduce net_amount field in payment response (#3115)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -3089,8 +3089,8 @@ impl AttemptType {
|
||||
|
||||
error_message: None,
|
||||
offer_amount: old_payment_attempt.offer_amount,
|
||||
surcharge_amount: old_payment_attempt.surcharge_amount,
|
||||
tax_amount: old_payment_attempt.tax_amount,
|
||||
surcharge_amount: None,
|
||||
tax_amount: None,
|
||||
payment_method_id: None,
|
||||
payment_method: None,
|
||||
capture_method: old_payment_attempt.capture_method,
|
||||
@ -3133,6 +3133,7 @@ impl AttemptType {
|
||||
merchant_connector_id: None,
|
||||
unified_code: None,
|
||||
unified_message: None,
|
||||
net_amount: old_payment_attempt.amount,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -565,6 +565,7 @@ where
|
||||
});
|
||||
services::ApplicationResponse::JsonWithHeaders((
|
||||
response
|
||||
.set_net_amount(payment_attempt.net_amount)
|
||||
.set_payment_id(Some(payment_attempt.payment_id))
|
||||
.set_merchant_id(Some(payment_attempt.merchant_id))
|
||||
.set_status(payment_intent.status)
|
||||
@ -714,6 +715,7 @@ where
|
||||
}
|
||||
None => services::ApplicationResponse::JsonWithHeaders((
|
||||
api::PaymentsResponse {
|
||||
net_amount: payment_attempt.net_amount,
|
||||
payment_id: Some(payment_attempt.payment_id),
|
||||
merchant_id: Some(payment_attempt.merchant_id),
|
||||
status: payment_intent.status,
|
||||
|
||||
Reference in New Issue
Block a user