1
1
use masking:: Secret ;
2
- use router:: types:: { self , api, storage:: enums} ;
2
+ use router:: types:: { self , api, domain , storage:: enums} ;
3
3
use test_utils:: connector_auth;
4
4
5
5
use crate :: utils:: { self , ConnectorActions } ;
@@ -10,12 +10,12 @@ impl ConnectorActions for CeleroTest {}
10
10
impl utils:: Connector for CeleroTest {
11
11
fn get_data ( & self ) -> api:: ConnectorData {
12
12
use router:: connector:: Celero ;
13
- api :: ConnectorData {
14
- connector : Box :: new ( Celero :: new ( ) ) ,
15
- connector_name : types:: Connector :: Celero ,
16
- get_token : types :: api:: GetToken :: Connector ,
17
- merchant_connector_id : None ,
18
- }
13
+ utils :: construct_connector_data_old (
14
+ Box :: new ( Celero :: new ( ) ) ,
15
+ types:: Connector :: Celero ,
16
+ api:: GetToken :: Connector ,
17
+ None ,
18
+ )
19
19
}
20
20
21
21
fn get_auth_token ( & self ) -> types:: ConnectorAuthType {
@@ -302,7 +302,7 @@ async fn should_fail_payment_for_incorrect_cvc() {
302
302
let response = CONNECTOR
303
303
. make_payment (
304
304
Some ( types:: PaymentsAuthorizeData {
305
- payment_method_data : types :: api :: PaymentMethodData :: Card ( api :: Card {
305
+ payment_method_data : domain :: PaymentMethodData :: Card ( domain :: Card {
306
306
card_cvc : Secret :: new ( "12345" . to_string ( ) ) ,
307
307
..utils:: CCardType :: default ( ) . 0
308
308
} ) ,
@@ -324,7 +324,7 @@ async fn should_fail_payment_for_invalid_exp_month() {
324
324
let response = CONNECTOR
325
325
. make_payment (
326
326
Some ( types:: PaymentsAuthorizeData {
327
- payment_method_data : api :: PaymentMethodData :: Card ( api :: Card {
327
+ payment_method_data : domain :: PaymentMethodData :: Card ( domain :: Card {
328
328
card_exp_month : Secret :: new ( "20" . to_string ( ) ) ,
329
329
..utils:: CCardType :: default ( ) . 0
330
330
} ) ,
@@ -346,7 +346,7 @@ async fn should_fail_payment_for_incorrect_expiry_year() {
346
346
let response = CONNECTOR
347
347
. make_payment (
348
348
Some ( types:: PaymentsAuthorizeData {
349
- payment_method_data : api :: PaymentMethodData :: Card ( api :: Card {
349
+ payment_method_data : domain :: PaymentMethodData :: Card ( domain :: Card {
350
350
card_exp_year : Secret :: new ( "2000" . to_string ( ) ) ,
351
351
..utils:: CCardType :: default ( ) . 0
352
352
} ) ,
0 commit comments