mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 04:04:43 +08:00
feat(payment_charges): add support for collecting and refunding charges on payments (#4628)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: Narayan Bhat <48803246+Narayanbhat166@users.noreply.github.com> Co-authored-by: Shankar Singh C <83439957+ShankarSinghC@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: YongJoon Kim <penubokim@gmail.com> Co-authored-by: Sanchith Hegde <22217505+SanchithHegde@users.noreply.github.com> Co-authored-by: chikke srujan <121822803+srujanchikke@users.noreply.github.com> Co-authored-by: Hrithikesh <61539176+hrithikesh026@users.noreply.github.com> Co-authored-by: Chethan Rao <70657455+Chethan-rao@users.noreply.github.com> Co-authored-by: Sampras Lopes <Sampras.lopes@juspay.in>
This commit is contained in:
@ -223,6 +223,7 @@ pub async fn construct_refund_router_data<'a, F>(
|
||||
payment_attempt: &storage::PaymentAttempt,
|
||||
refund: &'a storage::Refund,
|
||||
creds_identifier: Option<String>,
|
||||
charges: Option<types::ChargeRefunds>,
|
||||
) -> RouterResult<types::RefundsRouterData<F>> {
|
||||
let profile_id = get_profile_id_from_business_details(
|
||||
payment_intent.business_country,
|
||||
@ -330,6 +331,7 @@ pub async fn construct_refund_router_data<'a, F>(
|
||||
reason: refund.refund_reason.clone(),
|
||||
connector_refund_id: refund.connector_refund_id.clone(),
|
||||
browser_info,
|
||||
charges,
|
||||
},
|
||||
|
||||
response: Ok(types::RefundsResponseData {
|
||||
|
||||
Reference in New Issue
Block a user