feat(single_use): add extra fields in Mandate table and MandateData [Blocked on #61] (#66)

This commit is contained in:
Nishant Joshi
2022-12-09 17:18:12 +05:30
committed by GitHub
parent 9710af1e56
commit 2aef3bccfb
9 changed files with 81 additions and 45 deletions

View File

@ -139,6 +139,11 @@ pub async fn get_token_for_recurring_mandate(
.await
.map_err(|error| error.to_not_found_response(errors::ApiErrorResponse::MandateNotFound))?;
utils::when(
mandate.mandate_status != storage_enums::MandateStatus::Active,
Err(errors::ApiErrorResponse::MandateNotFound),
)?;
let customer = req.customer_id.clone().get_required_value("customer_id")?;
let payment_method_id = {