@@ -197,12 +197,15 @@ impl ConnectorIntegration<api::AccessTokenAuth, types::AccessTokenRequestData, t
197
197
req : & types:: RefreshTokenRouterData ,
198
198
connectors : & settings:: Connectors ,
199
199
) -> CustomResult < Option < services:: Request > , errors:: ConnectorError > {
200
+ let auth_details = itaubank:: ItaubankAuthType :: try_from ( & req. connector_auth_type ) ?;
200
201
let req = Some (
201
202
services:: RequestBuilder :: new ( )
202
203
. method ( services:: Method :: Post )
203
204
. attach_default_headers ( )
204
205
. headers ( types:: RefreshTokenType :: get_headers ( self , req, connectors) ?)
205
206
. url ( & types:: RefreshTokenType :: get_url ( self , req, connectors) ?)
207
+ . add_certificate ( auth_details. certificate )
208
+ . add_certificate_key ( auth_details. certificate_key )
206
209
. set_body ( types:: RefreshTokenType :: get_request_body (
207
210
self , req, connectors,
208
211
) ?)
@@ -326,6 +329,7 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
326
329
req : & types:: PaymentsAuthorizeRouterData ,
327
330
connectors : & settings:: Connectors ,
328
331
) -> CustomResult < Option < services:: Request > , errors:: ConnectorError > {
332
+ let auth_details = itaubank:: ItaubankAuthType :: try_from ( & req. connector_auth_type ) ?;
329
333
Ok ( Some (
330
334
services:: RequestBuilder :: new ( )
331
335
. method ( services:: Method :: Post )
@@ -336,6 +340,8 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
336
340
. headers ( types:: PaymentsAuthorizeType :: get_headers (
337
341
self , req, connectors,
338
342
) ?)
343
+ . add_certificate ( auth_details. certificate )
344
+ . add_certificate_key ( auth_details. certificate_key )
339
345
. set_body ( types:: PaymentsAuthorizeType :: get_request_body (
340
346
self , req, connectors,
341
347
) ?)
@@ -406,12 +412,15 @@ impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsRe
406
412
req : & types:: PaymentsSyncRouterData ,
407
413
connectors : & settings:: Connectors ,
408
414
) -> CustomResult < Option < services:: Request > , errors:: ConnectorError > {
415
+ let auth_details = itaubank:: ItaubankAuthType :: try_from ( & req. connector_auth_type ) ?;
409
416
Ok ( Some (
410
417
services:: RequestBuilder :: new ( )
411
418
. method ( services:: Method :: Get )
412
419
. url ( & types:: PaymentsSyncType :: get_url ( self , req, connectors) ?)
413
420
. attach_default_headers ( )
414
421
. headers ( types:: PaymentsSyncType :: get_headers ( self , req, connectors) ?)
422
+ . add_certificate ( auth_details. certificate )
423
+ . add_certificate_key ( auth_details. certificate_key )
415
424
. build ( ) ,
416
425
) )
417
426
}
@@ -480,6 +489,7 @@ impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::Payme
480
489
req : & types:: PaymentsCaptureRouterData ,
481
490
connectors : & settings:: Connectors ,
482
491
) -> CustomResult < Option < services:: Request > , errors:: ConnectorError > {
492
+ let auth_details = itaubank:: ItaubankAuthType :: try_from ( & req. connector_auth_type ) ?;
483
493
Ok ( Some (
484
494
services:: RequestBuilder :: new ( )
485
495
. method ( services:: Method :: Post )
@@ -488,6 +498,8 @@ impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::Payme
488
498
. headers ( types:: PaymentsCaptureType :: get_headers (
489
499
self , req, connectors,
490
500
) ?)
501
+ . add_certificate ( auth_details. certificate )
502
+ . add_certificate_key ( auth_details. certificate_key )
491
503
. set_body ( types:: PaymentsCaptureType :: get_request_body (
492
504
self , req, connectors,
493
505
) ?)
@@ -597,13 +609,16 @@ impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsRespon
597
609
req : & types:: RefundsRouterData < api:: Execute > ,
598
610
connectors : & settings:: Connectors ,
599
611
) -> CustomResult < Option < services:: Request > , errors:: ConnectorError > {
612
+ let auth_details = itaubank:: ItaubankAuthType :: try_from ( & req. connector_auth_type ) ?;
600
613
let request = services:: RequestBuilder :: new ( )
601
614
. method ( services:: Method :: Put )
602
615
. url ( & types:: RefundExecuteType :: get_url ( self , req, connectors) ?)
603
616
. attach_default_headers ( )
604
617
. headers ( types:: RefundExecuteType :: get_headers (
605
618
self , req, connectors,
606
619
) ?)
620
+ . add_certificate ( auth_details. certificate )
621
+ . add_certificate_key ( auth_details. certificate_key )
607
622
. set_body ( types:: RefundExecuteType :: get_request_body (
608
623
self , req, connectors,
609
624
) ?)
@@ -679,12 +694,15 @@ impl ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponse
679
694
req : & types:: RefundSyncRouterData ,
680
695
connectors : & settings:: Connectors ,
681
696
) -> CustomResult < Option < services:: Request > , errors:: ConnectorError > {
697
+ let auth_details = itaubank:: ItaubankAuthType :: try_from ( & req. connector_auth_type ) ?;
682
698
Ok ( Some (
683
699
services:: RequestBuilder :: new ( )
684
700
. method ( services:: Method :: Get )
685
701
. url ( & types:: RefundSyncType :: get_url ( self , req, connectors) ?)
686
702
. attach_default_headers ( )
687
703
. headers ( types:: RefundSyncType :: get_headers ( self , req, connectors) ?)
704
+ . add_certificate ( auth_details. certificate )
705
+ . add_certificate_key ( auth_details. certificate_key )
688
706
. set_body ( types:: RefundSyncType :: get_request_body (
689
707
self , req, connectors,
690
708
) ?)
0 commit comments