Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions crates/router/src/core/payment_methods/transformers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ pub enum StoreLockerReq<'a> {
LockerGeneric(StoreGenericReq<'a>),
}

impl StoreLockerReq<'_> {
pub fn update_requestor_card_reference(&mut self, card_reference: Option<String>) {
match self {
Self::LockerCard(c) => c.requestor_card_reference = card_reference,
Self::LockerGeneric(_) => (),
}
}
}

#[derive(Debug, Deserialize, Serialize)]
pub struct StoreCardReq<'a> {
pub merchant_id: &'a str,
Expand Down
5 changes: 4 additions & 1 deletion crates/router/src/core/payouts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1206,7 +1206,10 @@ pub async fn fulfill_payout(
.status
.unwrap_or(payout_attempt.status.to_owned());
payout_data.payouts.status = status;
if payout_data.payouts.recurring && payout_data.payouts.payout_method_id.is_none() {
if payout_data.payouts.recurring
&& payout_data.payouts.payout_method_id.is_none()
&& !helpers::is_payout_err_state(status)
{
helpers::save_payout_data_to_locker(
state,
payout_data,
Expand Down
Loading