Skip to content

Commit

Permalink
Merge branch 'main' into paypal-wallet-vaulting-while-purchasing
Browse files Browse the repository at this point in the history
  • Loading branch information
swangi-kumari committed Oct 28, 2024
2 parents b3b0316 + cd62658 commit 0f92960
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ All notable changes to HyperSwitch will be documented here.

- - -

## 2024.10.28.1

### Bug Fixes

- **core:** Fix setup mandate payments to store connector mandate details ([#6446](https://github.com/juspay/hyperswitch/pull/6446)) ([`cee84cd`](https://github.com/juspay/hyperswitch/commit/cee84cdcfd6c323e8db80163f462d8e286aae600))

**Full Changelog:** [`2024.10.28.0...2024.10.28.1`](https://github.com/juspay/hyperswitch/compare/2024.10.28.0...2024.10.28.1)

- - -

## 2024.10.28.0

### Features
Expand Down
28 changes: 28 additions & 0 deletions crates/router/src/core/payments/operations/payment_response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1085,6 +1085,34 @@ impl<F: Clone> PostUpdateTracker<F, PaymentData<F>, types::SetupMandateRequestDa
))
.await?;

payment_data.payment_method_info = if let Some(payment_method_id) = &payment_method_id {
match state
.store
.find_payment_method(
&(state.into()),
key_store,
payment_method_id,
merchant_account.storage_scheme,
)
.await
{
Ok(payment_method) => Some(payment_method),
Err(error) => {
if error.current_context().is_db_not_found() {
logger::info!("Payment Method not found in db {:?}", error);
None
} else {
Err(error)
.change_context(errors::ApiErrorResponse::InternalServerError)
.attach_printable("Error retrieving payment method from db")
.map_err(|err| logger::error!(payment_method_retrieve=?err))
.ok()
}
}
}
} else {
None
};
let mandate_id = mandate::mandate_procedure(
state,
resp,
Expand Down

0 comments on commit 0f92960

Please sign in to comment.