mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 00:49:42 +08:00
fix: populate payment_token in response (#287)
This commit is contained in:
@ -140,7 +140,6 @@ where
|
||||
payment_data.address,
|
||||
server,
|
||||
payment_data.connector_response.authentication_data,
|
||||
payment_data.token,
|
||||
operation,
|
||||
)
|
||||
}
|
||||
@ -230,7 +229,6 @@ pub fn payments_to_payments_response<R, Op>(
|
||||
address: PaymentAddress,
|
||||
server: &Server,
|
||||
redirection_data: Option<serde_json::Value>,
|
||||
payment_token: Option<String>,
|
||||
operation: Op,
|
||||
) -> RouterResponse<api::PaymentsResponse>
|
||||
where
|
||||
@ -311,7 +309,7 @@ where
|
||||
payment_method_data.map(api::PaymentMethodDataResponse::from),
|
||||
auth_flow == services::AuthFlow::Merchant,
|
||||
)
|
||||
.set_payment_token(payment_token)
|
||||
.set_payment_token(payment_attempt.payment_token)
|
||||
.set_error_message(payment_attempt.error_message)
|
||||
.set_shipping(address.shipping)
|
||||
.set_billing(address.billing)
|
||||
@ -374,6 +372,7 @@ where
|
||||
shipping: address.shipping,
|
||||
billing: address.billing,
|
||||
cancellation_reason: payment_attempt.cancellation_reason,
|
||||
payment_token: payment_attempt.payment_token,
|
||||
..Default::default()
|
||||
}),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user