1
1
import {
2
2
customerAcceptance ,
3
- singleUseMandateData ,
4
- multiUseMandateData ,
3
+ connectorDetails as commonConnectorDetails ,
5
4
} from "./Commons" ;
5
+ import { getCustomExchange } from "./Modifiers" ;
6
+
7
+ const DUPLICATION_TIMEOUT = 30000 ; // 30 seconds
8
+
9
+ const singleUseMandateData = {
10
+ customer_acceptance : customerAcceptance ,
11
+ mandate_type : {
12
+ single_use : {
13
+ amount : 8000 ,
14
+ currency : "USD" ,
15
+ } ,
16
+ } ,
17
+ } ;
18
+
19
+ const multiUseMandateData = {
20
+ customer_acceptance : customerAcceptance ,
21
+ mandate_type : {
22
+ multi_use : {
23
+ amount : 8000 ,
24
+ currency : "USD" ,
25
+ } ,
26
+ } ,
27
+ } ;
6
28
7
29
const successfulNo3DSCardDetails = {
8
30
card_number : "4242424242424242" ,
@@ -179,7 +201,7 @@ export const connectorDetails = {
179
201
Configs : {
180
202
DELAY : {
181
203
STATUS : true ,
182
- TIMEOUT : 15000 ,
204
+ TIMEOUT : DUPLICATION_TIMEOUT / 2 , // 15 seconds
183
205
} ,
184
206
} ,
185
207
Request : {
@@ -313,7 +335,7 @@ export const connectorDetails = {
313
335
Configs : {
314
336
DELAY : {
315
337
STATUS : true ,
316
- TIMEOUT : 15000 ,
338
+ TIMEOUT : DUPLICATION_TIMEOUT / 2 , // 15 seconds
317
339
} ,
318
340
} ,
319
341
Request : {
@@ -336,7 +358,7 @@ export const connectorDetails = {
336
358
Configs : {
337
359
DELAY : {
338
360
STATUS : true ,
339
- TIMEOUT : 15000 ,
361
+ TIMEOUT : DUPLICATION_TIMEOUT / 2 , // 15 seconds
340
362
} ,
341
363
} ,
342
364
Request : {
@@ -359,7 +381,7 @@ export const connectorDetails = {
359
381
Configs : {
360
382
DELAY : {
361
383
STATUS : true ,
362
- TIMEOUT : 15000 ,
384
+ TIMEOUT : DUPLICATION_TIMEOUT / 2 , // 15 seconds
363
385
} ,
364
386
TRIGGER_SKIP : true ,
365
387
} ,
@@ -383,7 +405,7 @@ export const connectorDetails = {
383
405
Configs : {
384
406
DELAY : {
385
407
STATUS : true ,
386
- TIMEOUT : 15000 ,
408
+ TIMEOUT : DUPLICATION_TIMEOUT / 2 , // 15 seconds
387
409
} ,
388
410
} ,
389
411
Request : {
@@ -430,7 +452,7 @@ export const connectorDetails = {
430
452
Configs : {
431
453
DELAY : {
432
454
STATUS : true ,
433
- TIMEOUT : 15000 ,
455
+ TIMEOUT : DUPLICATION_TIMEOUT / 2 , // 15 seconds
434
456
} ,
435
457
} ,
436
458
Request : {
@@ -452,7 +474,7 @@ export const connectorDetails = {
452
474
Configs : {
453
475
DELAY : {
454
476
STATUS : true ,
455
- TIMEOUT : 15000 ,
477
+ TIMEOUT : DUPLICATION_TIMEOUT / 2 , // 15 seconds
456
478
} ,
457
479
} ,
458
480
Request : {
@@ -469,7 +491,7 @@ export const connectorDetails = {
469
491
Configs : {
470
492
DELAY : {
471
493
STATUS : true ,
472
- TIMEOUT : 15000 ,
494
+ TIMEOUT : DUPLICATION_TIMEOUT / 2 , // 15 seconds
473
495
} ,
474
496
} ,
475
497
Request : {
@@ -486,7 +508,7 @@ export const connectorDetails = {
486
508
Configs : {
487
509
DELAY : {
488
510
STATUS : true ,
489
- TIMEOUT : 15000 ,
511
+ TIMEOUT : DUPLICATION_TIMEOUT / 2 , // 15 seconds
490
512
} ,
491
513
} ,
492
514
Request : {
@@ -504,9 +526,8 @@ export const connectorDetails = {
504
526
Configs : {
505
527
DELAY : {
506
528
STATUS : true ,
507
- TIMEOUT : 15000 ,
529
+ TIMEOUT : DUPLICATION_TIMEOUT ,
508
530
} ,
509
- TRIGGER_SKIP : true ,
510
531
} ,
511
532
Request : {
512
533
payment_method : "card" ,
@@ -528,9 +549,8 @@ export const connectorDetails = {
528
549
Configs : {
529
550
DELAY : {
530
551
STATUS : true ,
531
- TIMEOUT : 15000 ,
552
+ TIMEOUT : DUPLICATION_TIMEOUT ,
532
553
} ,
533
- TRIGGER_SKIP : true ,
534
554
} ,
535
555
Request : {
536
556
payment_method : "card" ,
@@ -544,20 +564,15 @@ export const connectorDetails = {
544
564
status : 200 ,
545
565
body : {
546
566
status : "succeeded" ,
547
- mandate_id : null ,
548
- payment_method_data : payment_method_data_no3ds ,
549
- payment_method : "card" ,
550
- connector : "payload" ,
551
567
} ,
552
568
} ,
553
569
} ,
554
570
MandateSingleUseNo3DSManualCapture : {
555
571
Configs : {
556
572
DELAY : {
557
573
STATUS : true ,
558
- TIMEOUT : 15000 ,
574
+ TIMEOUT : DUPLICATION_TIMEOUT ,
559
575
} ,
560
- TRIGGER_SKIP : true ,
561
576
} ,
562
577
Request : {
563
578
payment_method : "card" ,
@@ -571,20 +586,15 @@ export const connectorDetails = {
571
586
status : 200 ,
572
587
body : {
573
588
status : "requires_capture" ,
574
- mandate_id : null ,
575
- payment_method_data : payment_method_data_no3ds ,
576
- payment_method : "card" ,
577
- connector : "payload" ,
578
589
} ,
579
590
} ,
580
591
} ,
581
592
MandateMultiUseNo3DSAutoCapture : {
582
593
Configs : {
583
594
DELAY : {
584
595
STATUS : true ,
585
- TIMEOUT : 15000 ,
596
+ TIMEOUT : DUPLICATION_TIMEOUT ,
586
597
} ,
587
- TRIGGER_SKIP : true ,
588
598
} ,
589
599
Request : {
590
600
payment_method : "card" ,
@@ -598,19 +608,15 @@ export const connectorDetails = {
598
608
status : 200 ,
599
609
body : {
600
610
status : "succeeded" ,
601
- payment_method_data : payment_method_data_no3ds ,
602
- payment_method : "card" ,
603
- connector : "payload" ,
604
611
} ,
605
612
} ,
606
613
} ,
607
614
MandateMultiUseNo3DSManualCapture : {
608
615
Configs : {
609
616
DELAY : {
610
617
STATUS : true ,
611
- TIMEOUT : 15000 ,
618
+ TIMEOUT : DUPLICATION_TIMEOUT ,
612
619
} ,
613
- TRIGGER_SKIP : true ,
614
620
} ,
615
621
Request : {
616
622
payment_method : "card" ,
@@ -624,19 +630,15 @@ export const connectorDetails = {
624
630
status : 200 ,
625
631
body : {
626
632
status : "requires_capture" ,
627
- payment_method_data : payment_method_data_no3ds ,
628
- payment_method : "card" ,
629
- connector : "payload" ,
630
633
} ,
631
634
} ,
632
635
} ,
633
636
ZeroAuthPaymentIntent : {
634
637
Configs : {
635
638
DELAY : {
636
639
STATUS : true ,
637
- TIMEOUT : 15000 ,
640
+ TIMEOUT : DUPLICATION_TIMEOUT ,
638
641
} ,
639
- TRIGGER_SKIP : true ,
640
642
} ,
641
643
Request : {
642
644
currency : "BRL" ,
@@ -652,9 +654,8 @@ export const connectorDetails = {
652
654
Configs : {
653
655
DELAY : {
654
656
STATUS : true ,
655
- TIMEOUT : 15000 ,
657
+ TIMEOUT : DUPLICATION_TIMEOUT ,
656
658
} ,
657
- TRIGGER_SKIP : true ,
658
659
} ,
659
660
Request : {
660
661
payment_method : "card" ,
@@ -673,5 +674,30 @@ export const connectorDetails = {
673
674
} ,
674
675
} ,
675
676
} ,
677
+
678
+ MITAutoCapture : getCustomExchange ( {
679
+ Configs : {
680
+ DELAY : {
681
+ STATUS : true ,
682
+ TIMEOUT : DUPLICATION_TIMEOUT ,
683
+ } ,
684
+ } ,
685
+ ...commonConnectorDetails . card_pm . MITAutoCapture ,
686
+ } ) ,
687
+ MITManualCapture : {
688
+ Configs : {
689
+ DELAY : {
690
+ STATUS : true ,
691
+ TIMEOUT : DUPLICATION_TIMEOUT ,
692
+ } ,
693
+ } ,
694
+ Request : { } ,
695
+ Response : {
696
+ status : 200 ,
697
+ body : {
698
+ status : "requires_capture" ,
699
+ } ,
700
+ } ,
701
+ } ,
676
702
} ,
677
703
} ;
0 commit comments