File tree Expand file tree Collapse file tree 4 files changed +27
-10
lines changed Expand file tree Collapse file tree 4 files changed +27
-10
lines changed Original file line number Diff line number Diff line change @@ -1032,8 +1032,13 @@ where
1032
1032
1033
1033
let connector = if should_call_connector ( operation, payment_data) {
1034
1034
Some ( match connector_choice {
1035
- api:: ConnectorChoice :: SessionMultiple ( connectors) => {
1036
- api:: ConnectorCallType :: Multiple ( connectors)
1035
+ api:: ConnectorChoice :: SessionMultiple ( session_connectors) => {
1036
+ api:: ConnectorCallType :: Multiple (
1037
+ session_connectors
1038
+ . into_iter ( )
1039
+ . map ( |c| c. connector )
1040
+ . collect ( ) ,
1041
+ )
1037
1042
}
1038
1043
1039
1044
api:: ConnectorChoice :: StraightThrough ( straight_through) => connector_selection (
Original file line number Diff line number Diff line change @@ -350,7 +350,10 @@ where
350
350
connector_and_payment_method_type. 0 . as_str ( ) ,
351
351
api:: GetToken :: from ( connector_and_payment_method_type. 1 ) ,
352
352
) ?;
353
- connectors_data. push ( connector_details) ;
353
+ connectors_data. push ( api:: SessionConnectorData {
354
+ payment_method_type,
355
+ connector : connector_details,
356
+ } ) ;
354
357
}
355
358
}
356
359
}
@@ -364,7 +367,10 @@ where
364
367
connector_and_payment_method_type. 0 . as_str ( ) ,
365
368
api:: GetToken :: from ( connector_and_payment_method_type. 1 ) ,
366
369
) ?;
367
- connectors_data. push ( connector_details) ;
370
+ connectors_data. push ( api:: SessionConnectorData {
371
+ payment_method_type : connector_and_payment_method_type. 1 ,
372
+ connector : connector_details,
373
+ } ) ;
368
374
}
369
375
connectors_data
370
376
} ;
Original file line number Diff line number Diff line change @@ -150,8 +150,14 @@ pub struct ConnectorData {
150
150
pub get_token : GetToken ,
151
151
}
152
152
153
+ #[ derive( Clone ) ]
154
+ pub struct SessionConnectorData {
155
+ pub payment_method_type : api_enums:: PaymentMethodType ,
156
+ pub connector : ConnectorData ,
157
+ }
158
+
153
159
pub enum ConnectorChoice {
154
- SessionMultiple ( Vec < ConnectorData > ) ,
160
+ SessionMultiple ( Vec < SessionConnectorData > ) ,
155
161
StraightThrough ( serde_json:: Value ) ,
156
162
Decide ,
157
163
}
You can’t perform that action at this time.
0 commit comments