mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 00:49:42 +08:00
feat(core): Confirm true mandatory when using stored payment method id in payouts (#9424)
Co-authored-by: Sayak Bhattacharya <sayak.b@Sayak-Bhattacharya-G092THXJ34.local>
This commit is contained in:
committed by
GitHub
parent
68de6ba4e3
commit
fd2f85706c
@ -84,6 +84,11 @@ pub async fn validate_create_request(
|
|||||||
Option<domain::Customer>,
|
Option<domain::Customer>,
|
||||||
Option<PaymentMethod>,
|
Option<PaymentMethod>,
|
||||||
)> {
|
)> {
|
||||||
|
if req.payout_method_id.is_some() && req.confirm != Some(true) {
|
||||||
|
return Err(report!(errors::ApiErrorResponse::InvalidRequestData {
|
||||||
|
message: "Confirm must be true for recurring payouts".to_string(),
|
||||||
|
}));
|
||||||
|
}
|
||||||
let merchant_id = merchant_context.get_merchant_account().get_id();
|
let merchant_id = merchant_context.get_merchant_account().get_id();
|
||||||
|
|
||||||
if let Some(payout_link) = &req.payout_link {
|
if let Some(payout_link) = &req.payout_link {
|
||||||
|
|||||||
Reference in New Issue
Block a user