-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathUNIT_TEST.frm
More file actions
860 lines (763 loc) · 24.2 KB
/
Copy pathUNIT_TEST.frm
File metadata and controls
860 lines (763 loc) · 24.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "comdlg32.ocx"
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "tabctl32.ocx"
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "richtx32.ocx"
Begin VB.Form UNIT_TEST
Caption = "Form1"
ClientHeight = 8970
ClientLeft = 120
ClientTop = 465
ClientWidth = 14970
LinkTopic = "Form1"
ScaleHeight = 8970
ScaleWidth = 14970
StartUpPosition = 3 'Windows Default
Begin TabDlg.SSTab SSTab1
Height = 9015
Left = 0
TabIndex = 0
Top = 0
Width = 15015
_ExtentX = 26485
_ExtentY = 15901
_Version = 393216
Tabs = 5
TabsPerRow = 5
TabHeight = 520
TabCaption(0) = "Autenticación"
TabPicture(0) = "UNIT_TEST.frx":0000
Tab(0).ControlEnabled= -1 'True
Tab(0).Control(0)= "Label1"
Tab(0).Control(0).Enabled= 0 'False
Tab(0).Control(1)= "Label3"
Tab(0).Control(1).Enabled= 0 'False
Tab(0).Control(2)= "Auth"
Tab(0).Control(2).Enabled= 0 'False
Tab(0).Control(3)= "body"
Tab(0).Control(3).Enabled= 0 'False
Tab(0).Control(4)= "Respuesta"
Tab(0).Control(4).Enabled= 0 'False
Tab(0).ControlCount= 5
TabCaption(1) = "Timbrado"
TabPicture(1) = "UNIT_TEST.frx":001C
Tab(1).ControlEnabled= 0 'False
Tab(1).Control(0)= "Label4"
Tab(1).Control(0).Enabled= 0 'False
Tab(1).Control(1)= "CommonDialog1"
Tab(1).Control(1).Enabled= 0 'False
Tab(1).Control(2)= "cmbStamp"
Tab(1).Control(2).Enabled= 0 'False
Tab(1).Control(3)= "Command1"
Tab(1).Control(3).Enabled= 0 'False
Tab(1).Control(4)= "XMLATimbrar"
Tab(1).Control(4).Enabled= 0 'False
Tab(1).Control(5)= "StampResponse"
Tab(1).Control(5).Enabled= 0 'False
Tab(1).Control(6)= "Command4"
Tab(1).Control(6).Enabled= 0 'False
Tab(1).ControlCount= 7
TabCaption(2) = "Cancelación"
TabPicture(2) = "UNIT_TEST.frx":0038
Tab(2).ControlEnabled= 0 'False
Tab(2).Control(0)= "Label13"
Tab(2).Control(0).Enabled= 0 'False
Tab(2).Control(1)= "Label12"
Tab(2).Control(1).Enabled= 0 'False
Tab(2).Control(2)= "Label11"
Tab(2).Control(2).Enabled= 0 'False
Tab(2).Control(3)= "Label10"
Tab(2).Control(3).Enabled= 0 'False
Tab(2).Control(4)= "Label9"
Tab(2).Control(4).Enabled= 0 'False
Tab(2).Control(5)= "Label8"
Tab(2).Control(5).Enabled= 0 'False
Tab(2).Control(6)= "Label7"
Tab(2).Control(6).Enabled= 0 'False
Tab(2).Control(7)= "Label6"
Tab(2).Control(7).Enabled= 0 'False
Tab(2).Control(8)= "txtTipoCancelacion"
Tab(2).Control(8).Enabled= 0 'False
Tab(2).Control(9)= "txtRFC"
Tab(2).Control(9).Enabled= 0 'False
Tab(2).Control(10)= "TipoCancelacion"
Tab(2).Control(10).Enabled= 0 'False
Tab(2).Control(11)= "btnPFX"
Tab(2).Control(11).Enabled= 0 'False
Tab(2).Control(12)= "btnKey"
Tab(2).Control(12).Enabled= 0 'False
Tab(2).Control(13)= "btnCer"
Tab(2).Control(13).Enabled= 0 'False
Tab(2).Control(14)= "txtUUID"
Tab(2).Control(14).Enabled= 0 'False
Tab(2).Control(15)= "txtPswrdKey"
Tab(2).Control(15).Enabled= 0 'False
Tab(2).Control(16)= "txtPFX"
Tab(2).Control(16).Enabled= 0 'False
Tab(2).Control(17)= "txtKey"
Tab(2).Control(17).Enabled= 0 'False
Tab(2).Control(18)= "txtResultCancelacion"
Tab(2).Control(18).Enabled= 0 'False
Tab(2).Control(19)= "txtCer"
Tab(2).Control(19).Enabled= 0 'False
Tab(2).Control(20)= "btnCancelar"
Tab(2).Control(20).Enabled= 0 'False
Tab(2).Control(21)= "txtXML"
Tab(2).Control(21).Enabled= 0 'False
Tab(2).Control(22)= "Command5"
Tab(2).Control(22).Enabled= 0 'False
Tab(2).ControlCount= 23
TabCaption(3) = "Estado de Cuenta"
TabPicture(3) = "UNIT_TEST.frx":0054
Tab(3).ControlEnabled= 0 'False
Tab(3).Control(0)= "AccountBalanceParse"
Tab(3).Control(0).Enabled= 0 'False
Tab(3).Control(1)= "AccountBalanceResponse"
Tab(3).Control(1).Enabled= 0 'False
Tab(3).Control(2)= "Command2"
Tab(3).Control(2).Enabled= 0 'False
Tab(3).ControlCount= 3
TabCaption(4) = "Válidar"
TabPicture(4) = "UNIT_TEST.frx":0070
Tab(4).ControlEnabled= 0 'False
Tab(4).Control(0)= "Label5"
Tab(4).Control(0).Enabled= 0 'False
Tab(4).Control(1)= "XML"
Tab(4).Control(1).Enabled= 0 'False
Tab(4).Control(2)= "ValidateResponse"
Tab(4).Control(2).Enabled= 0 'False
Tab(4).Control(3)= "ValidateXML"
Tab(4).Control(3).Enabled= 0 'False
Tab(4).Control(4)= "Command3"
Tab(4).Control(4).Enabled= 0 'False
Tab(4).ControlCount= 5
Begin VB.CommandButton Command5
Caption = "Importar XML"
Height = 735
Left = -61440
TabIndex = 46
Top = 5400
Width = 1215
End
Begin RichTextLib.RichTextBox txtXML
Height = 735
Left = -70920
TabIndex = 45
Top = 5400
Width = 9375
_ExtentX = 16536
_ExtentY = 1296
_Version = 393217
Enabled = -1 'True
TextRTF = $"UNIT_TEST.frx":008C
End
Begin VB.CommandButton Command4
Caption = "Importar XML"
Height = 975
Left = -74520
TabIndex = 44
Top = 2160
Width = 2775
End
Begin RichTextLib.RichTextBox StampResponse
Height = 3855
Left = -71520
TabIndex = 43
Top = 4800
Width = 10695
_ExtentX = 18865
_ExtentY = 6800
_Version = 393217
Enabled = -1 'True
TextRTF = $"UNIT_TEST.frx":010E
End
Begin RichTextLib.RichTextBox XMLATimbrar
Height = 3375
Left = -71520
TabIndex = 42
Top = 1080
Width = 10695
_ExtentX = 18865
_ExtentY = 5953
_Version = 393217
Enabled = -1 'True
TextRTF = $"UNIT_TEST.frx":0190
End
Begin VB.TextBox Respuesta
Height = 1335
Left = 3840
MultiLine = -1 'True
TabIndex = 27
Top = 2880
Width = 9975
End
Begin VB.TextBox body
Height = 1335
Left = 3720
MultiLine = -1 'True
TabIndex = 26
Top = 840
Width = 9975
End
Begin VB.CommandButton Auth
Caption = "Autorización"
Height = 735
Left = 240
TabIndex = 25
Top = 840
Width = 2775
End
Begin VB.CommandButton Command1
Caption = "Timbrar"
Height = 855
Left = -74760
TabIndex = 24
Top = 6240
Width = 2775
End
Begin VB.CommandButton btnCancelar
Caption = "Cancelar"
Height = 975
Left = -74640
TabIndex = 23
Top = 7800
Width = 3135
End
Begin VB.CommandButton Command2
Caption = "Account Balance"
Height = 855
Left = -74760
TabIndex = 22
Top = 960
Width = 2775
End
Begin VB.CommandButton Command3
Caption = "Validate"
Height = 855
Left = -74640
TabIndex = 21
Top = 840
Width = 2775
End
Begin VB.TextBox ValidateXML
Height = 1935
Left = -71280
MultiLine = -1 'True
TabIndex = 20
Text = "UNIT_TEST.frx":0212
Top = 960
Width = 8055
End
Begin VB.ComboBox cmbStamp
Height = 315
ItemData = "UNIT_TEST.frx":0F51
Left = -74640
List = "UNIT_TEST.frx":0F61
TabIndex = 19
Top = 1440
Width = 2775
End
Begin VB.TextBox AccountBalanceResponse
Height = 2895
Left = -69720
MultiLine = -1 'True
TabIndex = 18
Top = 840
Width = 8655
End
Begin VB.TextBox AccountBalanceParse
Height = 3255
Left = -69720
MultiLine = -1 'True
TabIndex = 17
Top = 4680
Width = 8535
End
Begin VB.TextBox ValidateResponse
Height = 4095
Left = -71160
MultiLine = -1 'True
TabIndex = 16
Top = 3840
Width = 8055
End
Begin VB.TextBox txtCer
Enabled = 0 'False
Height = 615
Left = -70920
MultiLine = -1 'True
TabIndex = 15
Top = 840
Width = 8895
End
Begin VB.TextBox txtResultCancelacion
Height = 2295
Left = -70920
MultiLine = -1 'True
TabIndex = 14
Top = 6480
Width = 10575
End
Begin VB.TextBox txtKey
Enabled = 0 'False
Height = 735
Left = -70920
MultiLine = -1 'True
TabIndex = 13
Top = 1800
Width = 8895
End
Begin VB.TextBox txtPFX
Height = 855
Left = -70920
MultiLine = -1 'True
TabIndex = 12
Top = 3480
Width = 8895
End
Begin VB.TextBox txtPswrdKey
Height = 375
Left = -63840
TabIndex = 11
Top = 2760
Width = 3495
End
Begin VB.TextBox txtUUID
Height = 375
Left = -69600
TabIndex = 10
Top = 4560
Width = 9255
End
Begin VB.CommandButton btnCer
Caption = "Importar .Cer"
Enabled = 0 'False
Height = 495
Left = -61800
TabIndex = 9
Top = 840
Width = 1455
End
Begin VB.CommandButton btnKey
Caption = "Importar .Key"
Enabled = 0 'False
Height = 615
Left = -61680
TabIndex = 8
Top = 1800
Width = 1335
End
Begin VB.CommandButton btnPFX
Caption = "Importar .Pfx"
Height = 975
Left = -61800
TabIndex = 7
Top = 3360
Width = 1335
End
Begin VB.Frame TipoCancelacion
Caption = "Tipo de Cancelación"
Height = 2535
Left = -74640
TabIndex = 2
Top = 600
Width = 2895
Begin VB.OptionButton CancelarPorUUID
Caption = "Cancelar por UUID"
Height = 375
Left = 240
TabIndex = 6
Top = 1800
Width = 2055
End
Begin VB.OptionButton CancelarPorCSD
Caption = "Cancelar por CSD"
Height = 375
Left = 240
TabIndex = 5
Top = 1440
Width = 1800
End
Begin VB.OptionButton CancelarPorXML
Caption = "Cancelar por XML"
Height = 375
Left = 240
TabIndex = 4
Top = 1080
Width = 2175
End
Begin VB.OptionButton CancelarporPFX
Caption = "Cancelar por PFX"
Height = 375
Left = 240
TabIndex = 3
Top = 720
Value = -1 'True
Width = 2055
End
End
Begin VB.TextBox txtRFC
Height = 375
Left = -70320
TabIndex = 1
Top = 2760
Width = 3255
End
Begin MSComDlg.CommonDialog CommonDialog1
Left = -73680
Top = 5640
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.TextBox txtTipoCancelacion
Height = 375
Left = -73560
TabIndex = 28
Text = "PFX"
Top = 2640
Width = 1695
End
Begin VB.Label Label3
Caption = "Parseado"
Height = 255
Left = 3960
TabIndex = 41
Top = 2400
Width = 975
End
Begin VB.Label Label1
Caption = "Respuesta"
Height = 255
Left = 3720
TabIndex = 40
Top = 480
Width = 1215
End
Begin VB.Label Label4
Caption = "Versión"
Height = 375
Left = -74640
TabIndex = 39
Top = 1080
Width = 1935
End
Begin VB.Label XML
Caption = "XML"
Height = 375
Left = -71160
TabIndex = 38
Top = 480
Width = 3375
End
Begin VB.Label Label5
Caption = "Resultado Validación"
Height = 255
Left = -71160
TabIndex = 37
Top = 3360
Width = 1575
End
Begin VB.Label Label6
Caption = "Certificado"
Height = 255
Left = -70920
TabIndex = 36
Top = 600
Width = 2655
End
Begin VB.Label Label7
Caption = "Key"
Height = 255
Left = -70920
TabIndex = 35
Top = 1560
Width = 2175
End
Begin VB.Label Label8
Caption = "Contraseña Key"
Height = 255
Left = -65160
TabIndex = 34
Top = 2880
Width = 1335
End
Begin VB.Label Label9
Caption = "PFX"
Height = 255
Left = -70920
TabIndex = 33
Top = 3240
Width = 1935
End
Begin VB.Label Label10
Caption = "UUID"
Height = 255
Left = -70800
TabIndex = 32
Top = 4680
Width = 615
End
Begin VB.Label Label11
Caption = "Resultado"
Height = 255
Left = -70920
TabIndex = 31
Top = 6240
Width = 2655
End
Begin VB.Label Label12
Caption = "XML"
Height = 255
Left = -70920
TabIndex = 30
Top = 5040
Width = 1455
End
Begin VB.Label Label13
Caption = "RFC"
Height = 255
Left = -70920
TabIndex = 29
Top = 2880
Width = 615
End
End
End
Attribute VB_Name = "UNIT_TEST"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Auth_Click()
Dim Authentication As New Authentication
body.Text = Authentication.Token("http://services.test.sw.com.mx", "demo", "123456789")
' En caso de que presente un error el Script Control procederemos a agregarlo:
' Project/Components/Microsoft Script Control 1.0
Dim oScriptEngine As ScriptControl
Set oScriptEngine = New ScriptControl
oScriptEngine.Language = "JScript"
Dim sJsonString As String
sJsonString = body.Text
Dim objJSON As Object
Set objJSON = oScriptEngine.Eval("(" + sJsonString + ")")
Respuesta.Text = VBA.CallByName(VBA.CallByName(objJSON, "data", VbGet), "token", VbGet)
End Sub
Private Sub btnCancelar_Click()
Dim Cancelation As New Cancelation
Dim url As String
url = "http://services.test.sw.com.mx"
Dim Token As String
Token = Respuesta.Text
Dim Result As String
Dim TipoCancelacion As String
TipoCancelacion = txtTipoCancelacion.Text
Dim Cer As String
Cer = txtCer.Text
Dim Key As String
Key = txtKey.Text
Dim RFC As String
RFC = txtRFC.Text
Dim password As String
password = txtPswrdKey.Text
Dim PFX As String
PFX = txtPFX.Text
Dim UUID As String
UUID = txtUUID.Text
Dim XML As String
XML = txtXML.Text
txtResultCancelacion.Text = ""
MsgBox (TipoCancelacion)
If TipoCancelacion = "UUID" Then
Result = Cancelation.CancelationByUUID(url, RFC, UUID, Token)
ElseIf TipoCancelacion = "PFX" Then
Result = Cancelation.CancelationByPFX(url, PFX, UUID, password, RFC, Token)
ElseIf TipoCancelacion = "CSD" Then
Result = Cancelation.CancelationByCSD(url, Token, Cer, Key, password, UUID)
ElseIf TipoCancelacion = "XML" Then
Result = Cancelation.CancelationByXML(url, XML, Token)
End If
txtResultCancelacion.Text = Result
End Sub
Private Sub btnCer_Click()
Dim mybase64 As String
CommonDialog1.Filter = "Cer files (*.cer)|*.cer"
CommonDialog1.ShowOpen
If CommonDialog1.FileName <> "" Then
Open CommonDialog1.FileName For Input As #1
Do
Input #1, linetext
txtCer.Text = txtCer.Text & linetext
Loop Until EOF(1)
End If
Close #1
strAttachment = Base64EncodeString(txtCer.Text)
txtCer.Text = strAttachment
End Sub
Private Sub btnKey_Click()
Dim mybase64 As String
CommonDialog1.Filter = "Key files (*.key)|*.key"
CommonDialog1.ShowOpen
If CommonDialog1.FileName <> "" Then
Open CommonDialog1.FileName For Input As #1
Do
Input #1, linetext
txtKey.Text = txtKey.Text & linetext
Loop Until EOF(1)
End If
Close #1
strAttachment = Base64EncodeString(txtKey.Text)
txtKey.Text = strAttachment
End Sub
Private Sub btnPFX_Click()
Dim mybase64 As String
CommonDialog1.Filter = "Pfx files (*.pfx)|*.pfx"
CommonDialog1.ShowOpen
If CommonDialog1.FileName <> "" Then
Open CommonDialog1.FileName For Input As #1
Do
Input #1, linetext
txtPFX.Text = txtPFX.Text & linetext
Loop Until EOF(1)
End If
Close #1
strAttachment = Base64EncodeString(txtPFX.Text)
txtPFX.Text = strAttachment
End Sub
Private Sub CancelarPorCSD_Click()
txtCer.Enabled = True
txtCer.Text = ""
btnCer.Enabled = True
txtKey.Enabled = True
txtKey.Text = ""
btnKey.Enabled = True
txtPswrdKey.Enabled = True
txtPswrdKey.Text = ""
txtUUID.Enabled = False
txtUUID.Text = ""
txtXML.Enabled = False
txtPFX.Enabled = False
txtPFX.Text = ""
btnPFX.Enabled = False
txtResultCancelacion.Text = ""
txtTipoCancelacion.Text = "CSD"
End Sub
Private Sub CancelarporPFX_Click()
txtCer.Enabled = False
txtCer.Text = ""
btnCer.Enabled = False
txtKey.Enabled = False
txtKey.Text = ""
btnKey.Enabled = False
txtPswrdKey.Enabled = True
txtPswrdKey.Text = ""
txtUUID.Enabled = True
txtUUID.Text = ""
txtXML.Enabled = False
txtPFX.Enabled = True
txtPFX.Text = ""
txtRFC.Enabled = True
txtRFC.Text = ""
txtResultCancelacion.Text = ""
txtTipoCancelacion.Text = "PFX"
End Sub
Private Sub CancelarPorUUID_Click()
txtCer.Enabled = False
txtCer.Text = ""
btnCer.Enabled = False
txtKey.Enabled = False
txtKey.Text = ""
btnKey.Enabled = False
txtPswrdKey.Enabled = False
txtPswrdKey.Text = ""
txtUUID.Enabled = True
txtUUID.Text = ""
txtXML.Enabled = False
txtPFX.Enabled = False
txtPFX.Text = ""
btnPFX.Enabled = False
txtResultCancelacion.Text = ""
txtTipoCancelacion.Text = "UUID"
End Sub
Private Sub CancelarPorXML_Click()
txtCer.Enabled = False
txtCer.Text = ""
btnCer.Enabled = False
txtKey.Enabled = False
txtKey.Text = ""
btnKey.Enabled = False
txtPswrdKey.Enabled = False
txtPswrdKey.Text = ""
txtUUID.Enabled = False
txtUUID.Text = ""
txtXML.Enabled = True
txtPFX.Enabled = False
txtPFX.Text = ""
btnPFX.Enabled = False
txtResultCancelacion.Text = ""
txtTipoCancelacion.Text = "XML"
End Sub
Private Sub Command1_Click()
Dim Stamp As New Stamp
Dim XML As String
Dim Token As String
Dim url As String
Dim Result As String
Token = Respuesta.Text
url = "http://services.test.sw.com.mx"
XML = XMLATimbrar.Text
If cmbStamp.Text = "V1" Then
Result = Stamp.StampV1(url, XML, Token)
ElseIf cmbStamp.Text = "V2" Then
Result = Stamp.StampV2(url, XML, Token)
ElseIf cmbStamp.Text = "V3" Then
Result = Stamp.StampV3(url, XML, Token)
ElseIf cmbStamp.Text = "V4" Then
Result = Stamp.StampV4(url, XML, Token)
End If
StampResponse.Text = Result
End Sub
Private Sub Command2_Click()
Dim AccountBalance As New AccountBalance
Dim url As String
Dim Token As String
Dim XML As String
url = "http://services.test.sw.com.mx"
Token = Respuesta.Text
AccountBalanceResponse.Text = AccountBalance.AccountBalance(url, Token)
End Sub
Private Sub Command3_Click()
Dim Validate As New Validate
Dim url As String
Dim Token As String
Dim XML As String
url = "http://services.test.sw.com.mx"
Token = Respuesta.Text
XML = ValidateXML.Text
ValidateResponse.Text = Validate.Validate(url, Token, XML)
End Sub
Private Sub Command4_Click()
CommonDialog1.Filter = "XML files (*.xml)|*.xml"
CommonDialog1.ShowOpen
If CommonDialog1.FileName <> "" Then
Open CommonDialog1.FileName For Input As #1
Do
Input #1, linetext
XMLATimbrar.Text = XMLATimbrar.Text & linetext
Loop Until EOF(1)
End If
Close #1
txtXML.Text = XMLATimbrar.Text
End Sub
Private Sub Command5_Click()
CommonDialog1.Filter = "XML files (*.xml)|*.xml"
CommonDialog1.ShowOpen
If CommonDialog1.FileName <> "" Then
Open CommonDialog1.FileName For Input As #1
Do
Input #1, linetext
txtXML.Text = txtXML.Text & linetext
Loop Until EOF(1)
End If
Close #1
txtXML.Text = txtXML.Text
End Sub