@@ -224,7 +224,7 @@ pub async fn construct_payment_router_data_for_authorize<'a>(
224
224
let webhook_url = Some ( helpers:: create_webhook_url (
225
225
router_base_url,
226
226
& attempt. merchant_id ,
227
- connector_id ,
227
+ & merchant_connector_account . get_id ( ) ,
228
228
) ) ;
229
229
230
230
let router_return_url = payment_data
@@ -2368,11 +2368,17 @@ impl<F: Clone> TryFrom<PaymentAdditionalData<'_, F>> for types::PaymentsAuthoriz
2368
2368
attempt,
2369
2369
connector_name,
2370
2370
) ) ;
2371
-
2371
+ let merchant_connector_account_id = payment_data
2372
+ . payment_attempt
2373
+ . merchant_connector_id
2374
+ . clone ( )
2375
+ . get_required_value ( "merchant_connector_id" )
2376
+ . change_context ( errors:: ApiErrorResponse :: InternalServerError )
2377
+ . attach_printable ( "Merchant connector id is not present in payment_attempt" ) ?;
2372
2378
let webhook_url = Some ( helpers:: create_webhook_url (
2373
2379
router_base_url,
2374
2380
& attempt. merchant_id ,
2375
- connector_name ,
2381
+ & merchant_connector_account_id ,
2376
2382
) ) ;
2377
2383
let router_return_url = Some ( helpers:: create_redirect_url (
2378
2384
router_base_url,
@@ -3042,11 +3048,17 @@ impl<F: Clone> TryFrom<PaymentAdditionalData<'_, F>> for types::SetupMandateRequ
3042
3048
. map ( |customer| customer. clone ( ) . into_inner ( ) )
3043
3049
} ) ;
3044
3050
let amount = payment_data. payment_attempt . get_total_amount ( ) ;
3045
-
3051
+ let merchant_connector_account_id = payment_data
3052
+ . payment_attempt
3053
+ . merchant_connector_id
3054
+ . clone ( )
3055
+ . get_required_value ( "merchant_connector_id" )
3056
+ . change_context ( errors:: ApiErrorResponse :: InternalServerError )
3057
+ . attach_printable ( "Merchant connector id is not present in payment_attempt" ) ?;
3046
3058
let webhook_url = Some ( helpers:: create_webhook_url (
3047
3059
router_base_url,
3048
3060
& attempt. merchant_id ,
3049
- connector_name ,
3061
+ & merchant_connector_account_id ,
3050
3062
) ) ;
3051
3063
3052
3064
Ok ( Self {
@@ -3245,11 +3257,17 @@ impl<F: Clone> TryFrom<PaymentAdditionalData<'_, F>> for types::PaymentsPreProce
3245
3257
. collect :: < Result < Vec < _ > , _ > > ( )
3246
3258
} )
3247
3259
. transpose ( ) ?;
3248
-
3260
+ let merchant_connector_account_id = payment_data
3261
+ . payment_attempt
3262
+ . merchant_connector_id
3263
+ . clone ( )
3264
+ . get_required_value ( "merchant_connector_id" )
3265
+ . change_context ( errors:: ApiErrorResponse :: InternalServerError )
3266
+ . attach_printable ( "Merchant connector id is not present in payment_attempt" ) ?;
3249
3267
let webhook_url = Some ( helpers:: create_webhook_url (
3250
3268
router_base_url,
3251
3269
& attempt. merchant_id ,
3252
- connector_name ,
3270
+ & merchant_connector_account_id ,
3253
3271
) ) ;
3254
3272
let router_return_url = Some ( helpers:: create_redirect_url (
3255
3273
router_base_url,
0 commit comments