fix: populate payment_token in response (#287)

This commit is contained in:
Nishant Joshi
2023-01-05 13:53:41 +05:30
committed by GitHub
parent bff8b35e28
commit 0ef4cce4f6
2 changed files with 3 additions and 4 deletions

View File

@ -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()
}),
})