mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-31 01:57:45 +08:00
feat(router): Added amount conversion function in core for connector module (#4710)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: Hrithikesh <61539176+hrithikesh026@users.noreply.github.com> Co-authored-by: Narayan Bhat <narayan.bhat@juspay.in>
This commit is contained in:
@ -46,7 +46,7 @@ impl From<StripeCreateRefundRequest> for refunds::RefundRequest {
|
||||
fn from(req: StripeCreateRefundRequest) -> Self {
|
||||
Self {
|
||||
refund_id: req.refund_id,
|
||||
amount: req.amount,
|
||||
amount: req.amount.map(common_utils::types::MinorUnit::new),
|
||||
payment_id: req.payment_intent,
|
||||
reason: req.reason,
|
||||
refund_type: Some(refunds::RefundType::Instant),
|
||||
@ -82,7 +82,7 @@ impl From<refunds::RefundResponse> for StripeRefundResponse {
|
||||
fn from(res: refunds::RefundResponse) -> Self {
|
||||
Self {
|
||||
id: res.refund_id,
|
||||
amount: res.amount,
|
||||
amount: res.amount.get_amount_as_i64(),
|
||||
currency: res.currency.to_ascii_lowercase(),
|
||||
payment_intent: res.payment_id,
|
||||
status: res.status.into(),
|
||||
|
||||
Reference in New Issue
Block a user