TodoPagoConectorSS 1.8.0 → 1.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/.github/issue_template.md +34 -0
  3. data/.gitignore +37 -0
  4. data/README.md +1553 -0
  5. data/TodoPago/DataProvider.rb +273 -0
  6. data/TodoPago/DiscoverPaymentMethodsTest.rb +71 -0
  7. data/TodoPago/GetAuthorizeAnswerTest.rb +61 -0
  8. data/TodoPago/GetCredentialsTest.rb +70 -0
  9. data/TodoPago/GetOperationsTest.rb +72 -0
  10. data/TodoPago/MockClient.rb +195 -0
  11. data/TodoPago/ReturnRequestTest.rb +64 -0
  12. data/TodoPago/SendAuthorizeRequestTest.rb +63 -0
  13. data/TodoPago/coverage/.last_run.json +5 -0
  14. data/TodoPago/coverage/.resultset.json +892 -0
  15. data/TodoPago/coverage/.resultset.json.lock +0 -0
  16. data/TodoPago/coverage/assets/0.10.0/application.css +799 -0
  17. data/TodoPago/coverage/assets/0.10.0/application.js +1707 -0
  18. data/TodoPago/coverage/assets/0.10.0/colorbox/border.png +0 -0
  19. data/TodoPago/coverage/assets/0.10.0/colorbox/controls.png +0 -0
  20. data/TodoPago/coverage/assets/0.10.0/colorbox/loading.gif +0 -0
  21. data/TodoPago/coverage/assets/0.10.0/colorbox/loading_background.png +0 -0
  22. data/TodoPago/coverage/assets/0.10.0/favicon_green.png +0 -0
  23. data/TodoPago/coverage/assets/0.10.0/favicon_red.png +0 -0
  24. data/TodoPago/coverage/assets/0.10.0/favicon_yellow.png +0 -0
  25. data/TodoPago/coverage/assets/0.10.0/loading.gif +0 -0
  26. data/TodoPago/coverage/assets/0.10.0/magnify.png +0 -0
  27. data/TodoPago/coverage/assets/0.10.0/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  28. data/TodoPago/coverage/assets/0.10.0/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  29. data/TodoPago/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  30. data/TodoPago/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  31. data/TodoPago/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  32. data/TodoPago/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  33. data/TodoPago/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  34. data/TodoPago/coverage/assets/0.10.0/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  35. data/TodoPago/coverage/assets/0.10.0/smoothness/images/ui-icons_222222_256x240.png +0 -0
  36. data/TodoPago/coverage/assets/0.10.0/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
  37. data/TodoPago/coverage/assets/0.10.0/smoothness/images/ui-icons_454545_256x240.png +0 -0
  38. data/TodoPago/coverage/assets/0.10.0/smoothness/images/ui-icons_888888_256x240.png +0 -0
  39. data/TodoPago/coverage/assets/0.10.0/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
  40. data/TodoPago/coverage/index.html +5510 -0
  41. data/TodoPago/test.rb +203 -0
  42. data/TodoPago/test_validations.rb +108 -0
  43. data/TodoPago/tests_coverage.rb +11 -0
  44. data/TodoPagoConector.gemspec +14 -0
  45. data/lib/Authorize.wsdl +320 -0
  46. data/lib/Classes/user.rb +30 -0
  47. data/lib/Connectors/RestConnector.rb +65 -0
  48. data/lib/Connectors/ServiceConnector.rb +32 -0
  49. data/lib/Connectors/SoapConnector.rb +139 -0
  50. data/lib/Exceptions/connection_exception.rb +6 -0
  51. data/lib/Exceptions/empty_field_exception.rb +6 -0
  52. data/lib/Exceptions/empty_field_password_exception.rb +8 -0
  53. data/lib/Exceptions/empty_field_user_exception.rb +8 -0
  54. data/lib/Exceptions/prueba.rb +5 -0
  55. data/lib/Exceptions/response_exception.rb +6 -0
  56. data/lib/FraudControlValidation.rb +406 -0
  57. data/lib/Operations.wsdl +319 -0
  58. data/lib/ServiceReferences/Authorize.wsdl +320 -0
  59. data/lib/ServiceReferences/EchoService.wsdl +125 -0
  60. data/lib/ServiceReferences/Operations.wsdl +319 -0
  61. data/lib/Validation/FraudControlValidation.rb +406 -0
  62. data/lib/config/postalCodes.json +26 -0
  63. data/lib/config/validations.json +623 -0
  64. data/lib/prueba.rb +4 -0
  65. data/lib/user.rb +41 -0
  66. metadata +65 -1
@@ -0,0 +1,273 @@
1
+ #encoding: utf-8
2
+
3
+ class DataProvider
4
+
5
+ def getHeader
6
+ return {
7
+ 'Authorization'=>'TODOPAGO ABCDEF1234567890'
8
+ }
9
+ end
10
+
11
+ #### SAR
12
+ def sendAuthorizeRequestOptions(test_condition)
13
+
14
+
15
+ optionsSAR_operacion = Hash.new
16
+ optionsSAR_operacion[:MERCHANT] = "2153"
17
+ optionsSAR_operacion[:OPERATIONID] = "8000"
18
+ optionsSAR_operacion[:CURRENCYCODE] = "032"
19
+ optionsSAR_operacion[:AMOUNT] = "1.00"
20
+
21
+ #Control de Fraude
22
+ optionsSAR_operacion[:CSBTCITY]="Villa General Belgrano"
23
+ optionsSAR_operacion[:CSBTCOUNTRY]= "AR"
24
+ optionsSAR_operacion[:CSBTEMAIL]= "todopago@hotmail.com"
25
+ optionsSAR_operacion[:CSBTFIRSTNAME]= "Juan"
26
+ optionsSAR_operacion[:CSBTLASTNAME]= "Peréz"
27
+ optionsSAR_operacion[:CSBTPHONENUMBER]= "541160913988"
28
+ optionsSAR_operacion[:CSBTPOSTALCODE]= " 1010"
29
+ optionsSAR_operacion[:CSBTSTATE]= "B"
30
+ optionsSAR_operacion[:CSBTSTREET1]= "Cerrito 740"
31
+
32
+ optionsSAR_operacion[:CSBTCUSTOMERID]= "453458"
33
+ optionsSAR_operacion[:CSBTIPADDRESS]= "192.0.0.4"
34
+ optionsSAR_operacion[:CSPTCURRENCY]= "ARS"
35
+ optionsSAR_operacion[:CSPTGRANDTOTALAMOUNT]= "10.01"
36
+ optionsSAR_operacion[:CSMDD6]= ""
37
+ optionsSAR_operacion[:CSMDD7]= ""
38
+ optionsSAR_operacion[:CSMDD8]= ""
39
+ optionsSAR_operacion[:CSMDD9]= ""
40
+ optionsSAR_operacion[:CSMDD10]= ""
41
+ optionsSAR_operacion[:CSMDD11]= ""
42
+
43
+ optionsSAR_operacion[:CSSTCITY]= "Villa General Belgrano"
44
+ optionsSAR_operacion[:CSSTCOUNTRY]= "AR"
45
+ optionsSAR_operacion[:CSSTEMAIL]= "some@someurl.com"
46
+ optionsSAR_operacion[:CSSTFIRSTNAME]= "Juan"
47
+ optionsSAR_operacion[:CSSTLASTNAME]= "Perez"
48
+ optionsSAR_operacion[:CSSTPHONENUMBER]= "541160913988"
49
+ optionsSAR_operacion[:CSSTPOSTALCODE]= " 1010"
50
+ optionsSAR_operacion[:CSSTSTATE]= "B"
51
+ optionsSAR_operacion[:CSSTSTREET1]= "Cerrito 740"
52
+
53
+ optionsSAR_operacion[:CSITPRODUCTCODE]= "electronic_good"
54
+ optionsSAR_operacion[:CSITPRODUCTDESCRIPTION]= "Test Prd Description "
55
+ optionsSAR_operacion[:CSITPRODUCTNAME]= "TestPrd"
56
+ optionsSAR_operacion[:CSITPRODUCTSKU]= "SKU1234"
57
+ optionsSAR_operacion[:CSITTOTALAMOUNT]= "10.01"
58
+ optionsSAR_operacion[:CSITQUANTITY]= "1"
59
+ optionsSAR_operacion[:CSITUNITPRICE]= "10.01"
60
+
61
+ optionsSAR_operacion[:CSMDD12]= ""
62
+ optionsSAR_operacion[:CSMDD13]= ""
63
+ optionsSAR_operacion[:CSMDD14]= ""
64
+ optionsSAR_operacion[:CSMDD15]= ""
65
+ optionsSAR_operacion[:CSMDD16]= ""
66
+
67
+ #Fin Control de Fraude
68
+
69
+ #Optionals
70
+ optionsSAR_operacion[:AVAILABLEPAYMENTMETHODSIDS]= "1#194#43#45"
71
+ optionsSAR_operacion[:PUSHNOTIFYMETHOD]= ""
72
+ optionsSAR_operacion[:PUSHNOTIFYENDPOINT]= ""
73
+ optionsSAR_operacion[:PUSHNOTIFYSTATES]= ""
74
+ optionsSAR_operacion[:MININSTALLMENTS]= "1"
75
+ optionsSAR_operacion[:MAXINSTALLMENTS]= "6"
76
+
77
+ optionsSAR_comercio = Hash.new
78
+ optionsSAR_comercio[:security]="1234567890ABCDEF1234567890ABCDEF"
79
+ optionsSAR_comercio[:MERCHANT]= "2153"
80
+ optionsSAR_comercio[:EncodingMethod]="XML"
81
+ optionsSAR_comercio[:URL_OK]= "http://someurl.com/ok/"
82
+ optionsSAR_comercio[:URL_ERROR]= "http://someurl.com/error/"
83
+ optionsSAR_comercio[:EMAILCLIENTE]= "mail@someurl.com"
84
+ optionsSAR_comercio[:Session]= "ABCDEF-1234-12221-FDE1-00000200"
85
+
86
+
87
+ case test_condition
88
+ when '702'
89
+ optionsSAR_operacion[:MERCHANT] = "4444"
90
+ when 'fail_required'
91
+ optionsSAR_operacion[:CSBTEMAIL]= '';
92
+ end
93
+
94
+ options = { optionsSAR_comercio: optionsSAR_comercio, optionsSAR_operacion: optionsSAR_operacion }
95
+
96
+ return options
97
+
98
+ end
99
+
100
+ def sendAuthorizeRequestSoapRequestOK
101
+ return {Security:"1234567890ABCDEF1234567890ABCDEF", Merchant:"2153", EncodingMethod:"XML", URL_OK:"http://someurl.com/ok/", URL_ERROR:"http://someurl.com/error/", EMAILCLIENTE:"mail@someurl.com", Session:"ABCDEF-1234-12221-FDE1-00000200", Payload:"<Request><MERCHANT>2153</MERCHANT><OPERATIONID>8000</OPERATIONID><CURRENCYCODE>032</CURRENCYCODE><AMOUNT>1.00</AMOUNT><CSBTCITY>Villa General Belgrano</CSBTCITY><CSBTCOUNTRY>AR</CSBTCOUNTRY><CSBTEMAIL>todopago@hotmail.com</CSBTEMAIL><CSBTFIRSTNAME>Juan</CSBTFIRSTNAME><CSBTLASTNAME>Peréz</CSBTLASTNAME><CSBTPHONENUMBER>541160913988</CSBTPHONENUMBER><CSBTPOSTALCODE> 1010</CSBTPOSTALCODE><CSBTSTATE>B</CSBTSTATE><CSBTSTREET1>Cerrito 740</CSBTSTREET1><CSBTCUSTOMERID>453458</CSBTCUSTOMERID><CSBTIPADDRESS>192.0.0.4</CSBTIPADDRESS><CSPTCURRENCY>ARS</CSPTCURRENCY><CSPTGRANDTOTALAMOUNT>10.01</CSPTGRANDTOTALAMOUNT><CSMDD6></CSMDD6><CSMDD7></CSMDD7><CSMDD8></CSMDD8><CSMDD9></CSMDD9><CSMDD10></CSMDD10><CSMDD11></CSMDD11><CSSTCITY>Villa General Belgrano</CSSTCITY><CSSTCOUNTRY>AR</CSSTCOUNTRY><CSSTEMAIL>some@someurl.com</CSSTEMAIL><CSSTFIRSTNAME>Juan</CSSTFIRSTNAME><CSSTLASTNAME>Perez</CSSTLASTNAME><CSSTPHONENUMBER>541160913988</CSSTPHONENUMBER><CSSTPOSTALCODE> 1010</CSSTPOSTALCODE><CSSTSTATE>B</CSSTSTATE><CSSTSTREET1>Cerrito 740</CSSTSTREET1><CSITPRODUCTCODE>electronic_good</CSITPRODUCTCODE><CSITPRODUCTDESCRIPTION>Test Prd Description </CSITPRODUCTDESCRIPTION><CSITPRODUCTNAME>TestPrd</CSITPRODUCTNAME><CSITPRODUCTSKU>SKU1234</CSITPRODUCTSKU><CSITTOTALAMOUNT>10.01</CSITTOTALAMOUNT><CSITQUANTITY>1</CSITQUANTITY><CSITUNITPRICE>10.01</CSITUNITPRICE><CSMDD12></CSMDD12><CSMDD13></CSMDD13><CSMDD14></CSMDD14><CSMDD15></CSMDD15><CSMDD16></CSMDD16><AVAILABLEPAYMENTMETHODSIDS>1#194#43#45</AVAILABLEPAYMENTMETHODSIDS><PUSHNOTIFYMETHOD></PUSHNOTIFYMETHOD><PUSHNOTIFYENDPOINT></PUSHNOTIFYENDPOINT><PUSHNOTIFYSTATES></PUSHNOTIFYSTATES><MININSTALLMENTS>1</MININSTALLMENTS><MAXINSTALLMENTS>6</MAXINSTALLMENTS></Request>"}
102
+ end
103
+
104
+ def sendAuthorizeRequestSoapResponseOK
105
+ return '{"envelope":{"body":{"send_authorize_request_response":{"status_code":"-1","status_message":"Solicitud de Autorizacion Registrada","url_request":"https://developers.todopago.com.ar/formulario/commands?command=formulario&m=t703140ec-01dd-9de1-cc38-eb94f234213e","request_key":"2a4bcd0f-6bed-fe3b-84e6-b6e652738898","public_request_key":"t703140ec-01dd-9de1-cc38-eb94f234213e","@xmlns:api":"http://api.todopago.com.ar"}},"@xmlns:env":"http://schemas.xmlsoap.org/soap/envelope/","@xmlns:xsd":"http://www.w3.org/2001/XMLSchema","@xmlns:ns":"http://api.todopago.com.ar","@xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance"}}'
106
+ end
107
+
108
+
109
+ def sendAuthorizeRequestSoapFail702
110
+ return '{"envelope":{"body":{"send_authorize_request_response":{"status_code":"702","status_message":"Cuenta de vendedor invalida","@xmlns:api":"http://api.todopago.com.ar"}},"@xmlns:env":"http://schemas.xmlsoap.org/soap/envelope/","@xmlns:xsd":"http://www.w3.org/2001/XMLSchema","@xmlns:ns":"http://api.todopago.com.ar","@xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance"}}'
111
+ end
112
+
113
+ def sendAuthorizeRequestSoapFailRequired
114
+ return '{"envelope":{"body":{"send_authorize_request_response":{"status_code":"98005","status_message":"El campo CSBTEMAIL es obligatorio. (Min Length 1)","@xmlns:api":"http://api.todopago.com.ar"}},"@xmlns:env":"http://schemas.xmlsoap.org/soap/envelope/","@xmlns:xsd":"http://www.w3.org/2001/XMLSchema","@xmlns:ns":"http://api.todopago.com.ar","@xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance"}}'
115
+ end
116
+
117
+
118
+ #### GAA
119
+ def GetAuthorizeAnswerOptions(test_condition)
120
+ optionsAnwser=Hash.new
121
+ optionsAnwser[:security]= "f3d8b72c94ab4a06be2ef7c95490f7d3"
122
+ optionsAnwser[:MERCHANT]= "2153"
123
+ optionsAnwser[:RequestKey]= "710268a7-7688-c8bf-68c9-430107e6b9da"
124
+ optionsAnwser[:AnswerKey]= "693ca9cc-c940-06a4-8d96-1ab0d66f3ee6"
125
+
126
+ case test_condition
127
+ when '702'
128
+ optionsAnwser[:MERCHANT] = "4444"
129
+ when 'fail_required'
130
+ optionsAnwser[:RequestKey]= '';
131
+ end
132
+
133
+ return optionsAnwser
134
+ end
135
+
136
+ def GetAuthorizeAnswerRequestOK
137
+ return {Security:"f3d8b72c94ab4a06be2ef7c95490f7d3", Merchant:"2153", RequestKey:"710268a7-7688-c8bf-68c9-430107e6b9da", AnswerKey:"693ca9cc-c940-06a4-8d96-1ab0d66f3ee6"}
138
+ end
139
+
140
+ def GetAuthorizeAnswerResponseOK
141
+ return '{"envelope":{"body":{"get_authorize_answer_response":{"status_code":"-1","status_message":"APROBADA","authorization_key":"cc1e3882-56c3-791b-0d68-440b2a853119","encoding_method":"XML","payload":{"answer":{"datetime":"2017-05-10T14:04:51+00:00","currencyname":"Peso Argentino","paymentmethodname":"AMEX","ticketnumber":"12","authorizationcode":"654327","cardnumbervisible":"37641123XXXXX1007","barcode":null,"operationid":"12","couponexpdate":null,"couponsecexpdate":null,"couponsubscriber":null,"barcodetype":null,"associateddocumentation":null,"installmentpayments":"1","operationnumber":"50129213","@xmlns":"http://api.todopago.com.ar"},"request":{"merchant":"2153","operationid":"12","amount":"54.00","currencycode":"32","amountbuyer":"54.00","bankid":null,"promotionid":"2807","@xmlns":"http://api.todopago.com.ar"}},"@xmlns:api":"http://api.todopago.com.ar"}},"@xmlns:env":"http://schemas.xmlsoap.org/soap/envelope/","@xmlns:xsd":"http://www.w3.org/2001/XMLSchema","@xmlns:ns":"http://api.todopago.com.ar","@xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance"}}'
142
+ end
143
+
144
+ def GetAuthorizeAnswerResponseFail
145
+ return '{"envelope":{"body":{"get_authorize_answer_response":{"status_code":"404","status_message":"ERROR: Transaccion Enexistente","@xmlns:api":"http://api.todopago.com.ar"}},"@xmlns:env":"http://schemas.xmlsoap.org/soap/envelope/","@xmlns:xsd":"http://www.w3.org/2001/XMLSchema","@xmlns:ns":"http://api.todopago.com.ar","@xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance"}}'
146
+ end
147
+
148
+ def GetAuthorizeAnswerResponse702
149
+ return '{"envelope":{"body":{"get_authorize_answer_response":{"status_code":"702","status_message":"Cuenta de Vendedor Invalida","@xmlns:api":"http://api.todopago.com.ar"}},"@xmlns:env":"http://schemas.xmlsoap.org/soap/envelope/","@xmlns:xsd":"http://www.w3.org/2001/XMLSchema","@xmlns:ns":"http://api.todopago.com.ar","@xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance"}}'
150
+ end
151
+
152
+ ### GET OPERATIONS
153
+ def GetOperationsOptions(test_condition)
154
+ optionsOperations = Hash.new
155
+ optionsOperations[:MERCHANT] = "2153"
156
+ optionsOperations[:OPERATIONID] = "185"
157
+ if test_condition == 'fail'
158
+ optionsOperations[:MERCHANT] = "4444"
159
+ end
160
+ return optionsOperations
161
+ end
162
+
163
+ def GetOperationsRequestOk
164
+ return 'https://developers.todopago.com.ar/t/1.1/api/Operations/GetByOperationId/MERCHANT/2153/OPERATIONID/185'
165
+ end
166
+
167
+ def GetOperationsResponseOK
168
+ return '<OperationsColections xmlns="http://api.todopago.com.ar"><Operations><RESULTCODE>-1</RESULTCODE><RESULTMESSAGE>APROBADA</RESULTMESSAGE><DATETIME>2016-09-01T12:09:35.880-03:00</DATETIME><OPERATIONID>185</OPERATIONID><CURRENCYCODE>32</CURRENCYCODE><AMOUNT>3.00</AMOUNT><FEEAMOUNT>0.12</FEEAMOUNT><TAXAMOUNT>0.03</TAXAMOUNT><SERVICECHARGEAMOUNT xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></SERVICECHARGEAMOUNT><CREDITEDAMOUNT>2.85</CREDITEDAMOUNT><AMOUNTBUYER>3.00</AMOUNTBUYER><FEEAMOUNTBUYER xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></FEEAMOUNTBUYER><TAXAMOUNTBUYER xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></TAXAMOUNTBUYER><CREDITEDAMOUNTBUYER>3.00</CREDITEDAMOUNTBUYER><BANKID>18</BANKID><PROMOTIONID>148047</PROMOTIONID><TYPE>compra_online</TYPE><INSTALLMENTPAYMENTS>1</INSTALLMENTPAYMENTS><CUSTOMEREMAIL>elenagaivironsky@hotmail.com</CUSTOMEREMAIL><IDENTIFICATIONTYPE>DNI</IDENTIFICATIONTYPE><IDENTIFICATION>13415824</IDENTIFICATION><CARDNUMBER>45097901XXXXXX5600</CARDNUMBER><CARDHOLDERNAME>Mauricio Ghiorzi</CARDHOLDERNAME><TICKETNUMBER>5190</TICKETNUMBER><AUTHORIZATIONCODE>004675</AUTHORIZATIONCODE><BARCODE xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></BARCODE><COUPONEXPDATE xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></COUPONEXPDATE><COUPONSECEXPDATE xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></COUPONSECEXPDATE><COUPONSUBSCRIBER xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></COUPONSUBSCRIBER><PAYMENTMETHODCODE>42</PAYMENTMETHODCODE><PAYMENTMETHODNAME>VISA</PAYMENTMETHODNAME><PAYMENTMETHODTYPE>Crédito</PAYMENTMETHODTYPE><REFUNDED>2016-09-01T15:29:28.500-03:00</REFUNDED><PUSHNOTIFYMETHOD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></PUSHNOTIFYMETHOD><PUSHNOTIFYENDPOINT xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></PUSHNOTIFYENDPOINT><PUSHNOTIFYSTATES xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></PUSHNOTIFYSTATES><IDCONTRACARGO>0</IDCONTRACARGO><FECHANOTIFICACIONCUENTA xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></FECHANOTIFICACIONCUENTA><ESTADOCONTRACARGO xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></ESTADOCONTRACARGO><COMISION>0.12</COMISION><REFUNDS><REFUND><ID>3788872</ID><AMOUNT>3.00</AMOUNT><DATETIME>2016-09-01T15:29:28.800-03:00</DATETIME></REFUND></REFUNDS></Operations></OperationsColections>'
169
+ end
170
+
171
+ def GetOperationsResponseFail
172
+ return '<OperationsColections xmlns="http://api.todopago.com.ar"><Status>702</Status></OperationsColections>'
173
+ end
174
+
175
+ ### RESTURN REQUEST
176
+ def GetReturnOptions(test_condition)
177
+ optionRR=Hash.new
178
+ optionRR[:Merchant] = "2153"
179
+ optionRR[:Security] = "f3d8b72c94ab4a06be2ef7c95490f7d3"
180
+ optionRR[:RequestKey] = "710268a7-7688-c8bf-68c9-430107e6b9da"
181
+ optionRR[:AMOUNT] = "1"
182
+
183
+ case test_condition
184
+ when '702'
185
+ optionRR[:Merchant] = "4444"
186
+ when 'fail'
187
+ optionRR[:RequestKey]= '11111111111111';
188
+ end
189
+
190
+ return optionRR
191
+ end
192
+
193
+ def GetReturnRequestRequestOK
194
+ return {:Security=>"f3d8b72c94ab4a06be2ef7c95490f7d3", :Merchant=>"2153", :RequestKey=>"710268a7-7688-c8bf-68c9-430107e6b9da", :AMOUNT=>"1"}
195
+ end
196
+
197
+ def GetReturnRequestResponseOK
198
+ return '{"envelope":{"body":{"return_response":{"status_code":"2011","status_message":"Devolucion OK","authorization_key":"a61de00b-c118-2688-77b0-16dbe5799913","authorizationcode":"654402","@xmlns:api":"http://api.todopago.com.ar"}},"@xmlns:env":"http://schemas.xmlsoap.org/soap/envelope/","@xmlns:xsd":"http://www.w3.org/2001/XMLSchema","@xmlns:ns":"http://api.todopago.com.ar","@xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance"}}'
199
+ end
200
+
201
+ def GetReturnRequestResponseFail
202
+ return '{"envelope":{"body":{"return_response":{"status_code":"2013","status_message":"No es posible obtener los importes de las comisiones para realizar la devolucion","authorization_key":null,"authorizationcode":null,"@xmlns:api":"http://api.todopago.com.ar"}},"@xmlns:env":"http://schemas.xmlsoap.org/soap/envelope/","@xmlns:xsd":"http://www.w3.org/2001/XMLSchema","@xmlns:ns":"http://api.todopago.com.ar","@xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance"}}'
203
+ end
204
+
205
+ def GetReturnRequestResponseFail702
206
+ return '{"envelope":{"body":{"return_response":{"status_code":"702","status_message":"ERROR: Cuenta Inexistente","authorization_key":null,"authorizationcode":null,"@xmlns:api":"http://api.todopago.com.ar"}},"@xmlns:env":"http://schemas.xmlsoap.org/soap/envelope/","@xmlns:xsd":"http://www.w3.org/2001/XMLSchema","@xmlns:ns":"http://api.todopago.com.ar","@xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance"}}'
207
+ end
208
+
209
+ ### GET CREDENTIALS
210
+ def GetCredentialsOptions(test_condition)
211
+ params = {user:'mail@todopago.com', password:'Password1'}
212
+ case test_condition
213
+ when 'failUser'
214
+ params[:user] = "aaaa@bbbb.com"
215
+ when 'failPassword'
216
+ params[:password]= 'aaaaaa';
217
+ end
218
+
219
+ return params
220
+
221
+ end
222
+
223
+ def GetCredentialsResponseOK
224
+ return '{"Credentials":{"codigoResultado":1,"resultado":{"codigoResultado":0,"mensajeKey":null,"mensajeResultado":"Aceptado"},"merchantId":2153,"APIKey":"TODOPAGO f3d8b72c94ab4a06be2ef7c95490f7d3"}}'
225
+ end
226
+
227
+ def GetCredentialsResponseFailUser
228
+ return '{"Credentials":{"codigoResultado":1,"resultado":{"codigoResultado":1050,"mensajeKey":1050,"mensajeResultado":"Este usuario no se encuentra registrado. Revisá la información indicada o registrate."},"merchantId":null,"APIKey":null}}'
229
+ end
230
+
231
+ def GetCredentialsResponseFailPassword
232
+ return '{"Credentials":{"codigoResultado":1,"resultado":{"codigoResultado":1055,"mensajeKey":1055,"mensajeResultado":"La contraseña ingresada es incorrecta. Revisala."},"merchantId":null,"APIKey":null}}'
233
+ end
234
+
235
+
236
+ ### DiscoverPaymentMethods
237
+ def discoverPaymentMethodsResponseOK
238
+ return '<PaymentMethodsCollection xmlns="http://api.todopago.com.ar"><PaymentMethod><ID>1</ID><Logo>http://10.123.4.121:8092/images/AMEX.png</Logo><Name>AMEX</Name></PaymentMethod><PaymentMethod><ID>2</ID><Logo>http://10.123.4.121:8092/images/DINERS.png</Logo><Name>DINERS</Name></PaymentMethod><PaymentMethod><ID>6</ID><Logo>http://10.123.4.121:8092/images/CABAL.png</Logo><Name>CABAL</Name></PaymentMethod><PaymentMethod><ID>13</ID><Logo>http://10.123.4.121:8092/images/MAESTRO.png</Logo><Name>MAESTRO</Name></PaymentMethod><PaymentMethod><ID>14</ID><Logo>http://10.123.4.121:8092/images/MC.png</Logo><Name>MASTERCARD</Name></PaymentMethod><PaymentMethod><ID>30</ID><Logo>http://10.123.4.121:8092/images/NARANJA.png</Logo><Name>NARANJA</Name></PaymentMethod><PaymentMethod><ID>42</ID><Logo>http://10.123.4.121:8092/images/VISA.png</Logo><Name>VISA</Name></PaymentMethod><PaymentMethod><ID>43</ID><Logo>http://10.123.4.121:8092/images/VISAD.png</Logo><Name>VISA DEBITO</Name></PaymentMethod><PaymentMethod><ID>129</ID><Logo>http://10.123.4.121:8092/images/CABALD.png</Logo><Name>CABAL24</Name></PaymentMethod><PaymentMethod><ID>500</ID><Logo>http://10.123.4.121:8092/images/RAPIPAGO.png</Logo><Name>RAPIPAGO</Name></PaymentMethod><PaymentMethod><ID>900</ID><Logo>http://10.123.4.121:8092/images/VISAR.jpg</Logo><Name>VISA RECARGABLE</Name></PaymentMethod><PaymentMethod><ID>907</ID><Logo>http://10.123.4.121:8092/images/MCD.png</Logo><Name>MASTER DEBIT</Name></PaymentMethod></PaymentMethodsCollection>'
239
+ end
240
+
241
+ def discoverPaymentMethodsResponseFail
242
+ return '<PaymentMethodsCollection xmlns="http://api.todopago.com.ar"></PaymentMethodsCollection>'
243
+ end
244
+
245
+ ### GET AllPaymentMethods
246
+ def GetAllPaymentMethodsResponseOK
247
+ return '<Result xmlns="http://api.todopago.com.ar"><PaymentMethodsCollection><PaymentMethod><Id>1</Id><Name>AMEX</Name><Logo>http://10.123.4.121:8092/images/AMEX.png</Logo><ExpirationDateCheck>true</ExpirationDateCheck><SecurityCodeLength>4</SecurityCodeLength><SecurityCodeCheck>true</SecurityCodeCheck><CardNumberLengthMax>15</CardNumberLengthMax><CardNumberLengthMin>15</CardNumberLengthMin><CurrenciesCollection><Currency><Id>032</Id><Name>Peso Argentino</Name></Currency></CurrenciesCollection></PaymentMethod><PaymentMethod><Id>2</Id><Name>DINERS</Name><Logo>http://10.123.4.121:8092/images/DINERS.png</Logo><ExpirationDateCheck>true</ExpirationDateCheck><SecurityCodeLength>3</SecurityCodeLength><SecurityCodeCheck>true</SecurityCodeCheck><CardNumberLengthMax>16</CardNumberLengthMax><CardNumberLengthMin>14</CardNumberLengthMin><CurrenciesCollection></CurrenciesCollection></PaymentMethod><PaymentMethod><Id>6</Id><Name>CABAL</Name><Logo>http://10.123.4.121:8092/images/CABAL.png</Logo><ExpirationDateCheck>true</ExpirationDateCheck><SecurityCodeLength>3</SecurityCodeLength><SecurityCodeCheck>true</SecurityCodeCheck><CardNumberLengthMax>16</CardNumberLengthMax><CardNumberLengthMin>16</CardNumberLengthMin><CurrenciesCollection><Currency><Id>032</Id><Name>Peso Argentino</Name></Currency></CurrenciesCollection></PaymentMethod><PaymentMethod><Id>13</Id><Name>MAESTRO</Name><Logo>http://10.123.4.121:8092/images/MAESTRO.png</Logo><ExpirationDateCheck>false</ExpirationDateCheck><SecurityCodeLength>3</SecurityCodeLength><SecurityCodeCheck>true</SecurityCodeCheck><CardNumberLengthMax>18</CardNumberLengthMax><CardNumberLengthMin>16</CardNumberLengthMin><CurrenciesCollection></CurrenciesCollection></PaymentMethod><PaymentMethod><Id>14</Id><Name>MASTERCARD</Name><Logo>http://10.123.4.121:8092/images/MC.png</Logo><ExpirationDateCheck>true</ExpirationDateCheck><SecurityCodeLength>3</SecurityCodeLength><SecurityCodeCheck>true</SecurityCodeCheck><CardNumberLengthMax>16</CardNumberLengthMax><CardNumberLengthMin>16</CardNumberLengthMin><CurrenciesCollection><Currency><Id>032</Id><Name>Peso Argentino</Name></Currency></CurrenciesCollection></PaymentMethod><PaymentMethod><Id>30</Id><Name>NARANJA</Name><Logo>http://10.123.4.121:8092/images/NARANJA.png</Logo><ExpirationDateCheck>true</ExpirationDateCheck><SecurityCodeLength>3</SecurityCodeLength><SecurityCodeCheck>true</SecurityCodeCheck><CardNumberLengthMax>16</CardNumberLengthMax><CardNumberLengthMin>16</CardNumberLengthMin><CurrenciesCollection><Currency><Id>032</Id><Name>Peso Argentino</Name></Currency><Currency><Id>032</Id><Name>Peso Argentino</Name></Currency></CurrenciesCollection></PaymentMethod><PaymentMethod><Id>42</Id><Name>VISA</Name><Logo>http://10.123.4.121:8092/images/VISA.png</Logo><ExpirationDateCheck>true</ExpirationDateCheck><SecurityCodeLength>3</SecurityCodeLength><SecurityCodeCheck>true</SecurityCodeCheck><CardNumberLengthMax>16</CardNumberLengthMax><CardNumberLengthMin>16</CardNumberLengthMin><CurrenciesCollection><Currency><Id>032</Id><Name>Peso Argentino</Name></Currency><Currency><Id>841</Id><Name>Dolar Estadounidense</Name></Currency></CurrenciesCollection></PaymentMethod><PaymentMethod><Id>43</Id><Name>VISA DEBITO</Name><Logo>http://10.123.4.121:8092/images/VISAD.png</Logo><ExpirationDateCheck>false</ExpirationDateCheck><SecurityCodeLength>0</SecurityCodeLength><SecurityCodeCheck>false</SecurityCodeCheck><CardNumberLengthMax>19</CardNumberLengthMax><CardNumberLengthMin>13</CardNumberLengthMin><CurrenciesCollection><Currency><Id>032</Id><Name>Peso Argentino</Name></Currency></CurrenciesCollection></PaymentMethod><PaymentMethod><Id>129</Id><Name>CABAL24</Name><Logo>http://10.123.4.121:8092/images/CABALD.png</Logo><ExpirationDateCheck>false</ExpirationDateCheck><SecurityCodeLength>3</SecurityCodeLength><SecurityCodeCheck>true</SecurityCodeCheck><CardNumberLengthMax>19</CardNumberLengthMax><CardNumberLengthMin>13</CardNumberLengthMin><CurrenciesCollection></CurrenciesCollection></PaymentMethod><PaymentMethod><Id>500</Id><Name>RAPIPAGO</Name><Logo>http://10.123.4.121:8092/images/RAPIPAGO.png</Logo><ExpirationDateCheck>false</ExpirationDateCheck><SecurityCodeLength>0</SecurityCodeLength><SecurityCodeCheck>false</SecurityCodeCheck><CardNumberLengthMax>0</CardNumberLengthMax><CardNumberLengthMin>0</CardNumberLengthMin><CurrenciesCollection><Currency><Id>032</Id><Name>Peso Argentino</Name></Currency></CurrenciesCollection></PaymentMethod><PaymentMethod><Id>900</Id><Name>VISA RECARGABLE</Name><Logo>http://10.123.4.121:8092/images/VISAR.jpg</Logo><ExpirationDateCheck>true</ExpirationDateCheck><SecurityCodeLength>0</SecurityCodeLength><SecurityCodeCheck>true</SecurityCodeCheck><CardNumberLengthMax>18</CardNumberLengthMax><CardNumberLengthMin>13</CardNumberLengthMin><CurrenciesCollection></CurrenciesCollection></PaymentMethod><PaymentMethod><Id>907</Id><Name>MASTER DEBIT</Name><Logo>http://10.123.4.121:8092/images/MCD.png</Logo><ExpirationDateCheck>false</ExpirationDateCheck><SecurityCodeLength>3</SecurityCodeLength><SecurityCodeCheck>true</SecurityCodeCheck><CardNumberLengthMax>16</CardNumberLengthMax><CardNumberLengthMin>16</CardNumberLengthMin><CurrenciesCollection></CurrenciesCollection></PaymentMethod></PaymentMethodsCollection><BanksCollection><Bank><Id>1</Id><Code>034</Code><Name>BANCO PATAGONIA S.A.</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>2</Id><Code>285</Code><Name>BANCO MACRO S.A.</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>3</Id><Code>014</Code><Name>BANCO DE LA PROVINCIA DE BS.AS.</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>4</Id><Code>015</Code><Name>ICBC</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>5</Id><Code>150</Code><Name>HSBC BANK ARGENTINA S.A.</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>6</Id><Code>016</Code><Name>CITIBANK</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>7</Id><Code>017</Code><Name>BBVA BANCO FRANCES S.A.</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>8</Id><Code>191</Code><Name>BANCO CREDICOOP</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>9</Id><Code>259</Code><Name>BANCO ITAU ARGENTINA S.A.</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>10</Id><Code>027</Code><Name>BANCO SUPERVIELLE S.A.</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>11</Id><Code>029</Code><Name>BANCO CIUDAD DE BUENOS AIRES</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>12</Id><Code>299</Code><Name>BANCO COMAFI</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>13</Id><Code>330</Code><Name>NUEVO BANCO DE SANTA FE</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>14</Id><Code>044</Code><Name>BANCO HIPOTECARIO</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>15</Id><Code>011</Code><Name>BANCO DE LA NACION ARGENTINA</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>16</Id><Code>060</Code><Name>BANCO DEL TUCUMAN S.A.</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>17</Id><Code>007</Code><Name>BANCO GALICIA</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>18</Id><Code>072</Code><Name>BANCO SANTANDER RIO S A</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>19</Id><Code>999</Code><Name>OTROS</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>20</Id><Code>045</Code><Name>BANCO DE SAN JUAN</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>21</Id><Code>086</Code><Name>BANCO SANTA CRUZ</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>22</Id><Code>322</Code><Name>BIND</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>23</Id><Code>386</Code><Name>NUEVO BANCO DE ENTRE RIOS</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>24</Id><Code>389</Code><Name>COLUMBIA</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>25</Id><Code>450</Code><Name>NARANJA VISA</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>26</Id><Code>455</Code><Name>NEVADA</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>27</Id><Code>499</Code><Name>MIRA</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>28</Id><Code>515</Code><Name>TARSHOP</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>29</Id><Code>077</Code><Name>EFECTIVO SI</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>30</Id><Code>800</Code><Name>AMEX</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>31</Id><Code>801</Code><Name>NARANJA</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>32</Id><Code>148</Code><Name>BANCO MUNICIPAL DE LA PLATA</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>33</Id><Code>020</Code><Name>BANCO DE CORDOBA</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>34</Id><Code>065</Code><Name>BANCO MUNICIPAL DE ROSARIO</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>35</Id><Code>066</Code><Name>BANCO MUNICIPAL DE ROSARIO/CONSUMAX</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>36</Id><Code>083</Code><Name>BANCO DEL CHUBUT</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>37</Id><Code>093</Code><Name>BANCO DE LA PAMPA</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>38</Id><Code>094</Code><Name>BANCO DE CORRIENTES</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>39</Id><Code>097</Code><Name>BANCO PROVINCIA DE NEUQUEN</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>40</Id><Code>121</Code><Name>PROVENCRED</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>41</Id><Code>268</Code><Name>BANCO DE TIERRA DEL FUEGO</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>42</Id><Code>277</Code><Name>BANCO SAENZ</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>43</Id><Code>301</Code><Name>BANCO PIANO</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>44</Id><Code>303</Code><Name>BANCO FINANSUR</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>45</Id><Code>309</Code><Name>NUEVO BANCO DE LA RIOJA</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>46</Id><Code>311</Code><Name>NUEVO BANCO DEL CHACO</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>47</Id><Code>315</Code><Name>BANCO DE FORMOSA S.A</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>48</Id><Code>321</Code><Name>BANCO DE SANTIAGO DEL ESTERO</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>49</Id><Code>331</Code><Name>BANCO CETELEM</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>50</Id><Code>341</Code><Name>BANCO MAS VENTAS S A</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>51</Id><Code>416</Code><Name>NATIVA NACION</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>52</Id><Code>426</Code><Name>BANCO BICA</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>53</Id><Code>431</Code><Name>BANCO COINAG</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>54</Id><Code>468</Code><Name>BANCO FUEGUINA</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>55</Id><Code>488</Code><Name>BANCO CAJA POPULAR DE TUCUMAN</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>56</Id><Code>310</Code><Name>BANCO DEL SOL</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>57</Id><Code>338</Code><Name>BST</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank><Bank><Id>58</Id><Code>269</Code><Name>BANCO DE LA REP. ORIENTAL DEL URUGUAY</Name><Logo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></Logo></Bank></BanksCollection><PaymentMethodBanksCollection><PaymentMethodBank><PaymentMethodId>42</PaymentMethodId><BankId>1</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>42</PaymentMethodId><BankId>2</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>42</PaymentMethodId><BankId>3</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>42</PaymentMethodId><BankId>4</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>42</PaymentMethodId><BankId>5</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>42</PaymentMethodId><BankId>6</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>42</PaymentMethodId><BankId>7</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>42</PaymentMethodId><BankId>8</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>42</PaymentMethodId><BankId>9</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>42</PaymentMethodId><BankId>10</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>42</PaymentMethodId><BankId>11</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>42</PaymentMethodId><BankId>12</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>42</PaymentMethodId><BankId>13</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>42</PaymentMethodId><BankId>14</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>42</PaymentMethodId><BankId>15</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>42</PaymentMethodId><BankId>16</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>42</PaymentMethodId><BankId>17</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>42</PaymentMethodId><BankId>18</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>42</PaymentMethodId><BankId>19</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>30</PaymentMethodId><BankId>19</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>2</PaymentMethodId><BankId>12</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>2</PaymentMethodId><BankId>19</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>14</PaymentMethodId><BankId>1</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>14</PaymentMethodId><BankId>2</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>14</PaymentMethodId><BankId>3</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>14</PaymentMethodId><BankId>4</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>14</PaymentMethodId><BankId>5</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>14</PaymentMethodId><BankId>6</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>14</PaymentMethodId><BankId>7</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>14</PaymentMethodId><BankId>8</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>14</PaymentMethodId><BankId>9</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>14</PaymentMethodId><BankId>10</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>14</PaymentMethodId><BankId>11</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>14</PaymentMethodId><BankId>12</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>14</PaymentMethodId><BankId>13</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>14</PaymentMethodId><BankId>15</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>14</PaymentMethodId><BankId>16</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>14</PaymentMethodId><BankId>17</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>14</PaymentMethodId><BankId>19</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>6</PaymentMethodId><BankId>8</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>1</PaymentMethodId><BankId>2</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>1</PaymentMethodId><BankId>5</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>1</PaymentMethodId><BankId>16</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>1</PaymentMethodId><BankId>18</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>1</PaymentMethodId><BankId>19</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>43</PaymentMethodId><BankId>7</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>43</PaymentMethodId><BankId>4</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>43</PaymentMethodId><BankId>5</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>43</PaymentMethodId><BankId>10</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>43</PaymentMethodId><BankId>17</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>43</PaymentMethodId><BankId>49</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>43</PaymentMethodId><BankId>20</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>43</PaymentMethodId><BankId>16</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>43</PaymentMethodId><BankId>21</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>43</PaymentMethodId><BankId>23</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>43</PaymentMethodId><BankId>13</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>43</PaymentMethodId><BankId>56</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>43</PaymentMethodId><BankId>58</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>129</PaymentMethodId><BankId>8</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>13</PaymentMethodId><BankId>11</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>13</PaymentMethodId><BankId>9</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>13</PaymentMethodId><BankId>15</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>13</PaymentMethodId><BankId>2</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>13</PaymentMethodId><BankId>19</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>906</PaymentMethodId><BankId>19</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>907</PaymentMethodId><BankId>19</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>43</PaymentMethodId><BankId>52</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>43</PaymentMethodId><BankId>11</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>43</PaymentMethodId><BankId>12</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>43</PaymentMethodId><BankId>3</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>43</PaymentMethodId><BankId>14</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>43</PaymentMethodId><BankId>9</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>43</PaymentMethodId><BankId>2</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>43</PaymentMethodId><BankId>1</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>43</PaymentMethodId><BankId>18</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>43</PaymentMethodId><BankId>6</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>43</PaymentMethodId><BankId>24</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>900</PaymentMethodId><BankId>8</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>900</PaymentMethodId><BankId>17</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>43</PaymentMethodId><BankId>19</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>900</PaymentMethodId><BankId>19</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>900</PaymentMethodId><BankId>7</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>42</PaymentMethodId><BankId>42</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>14</PaymentMethodId><BankId>42</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>43</PaymentMethodId><BankId>42</BankId></PaymentMethodBank><PaymentMethodBank><PaymentMethodId>42</PaymentMethodId><BankId>24</BankId></PaymentMethodBank></PaymentMethodBanksCollection></Result>'
248
+ end
249
+
250
+ ### GET BY RANGE DATETIME
251
+ def GetByRangeDateTimeOptions(test_condition)
252
+ optionsGBRDT=Hash.new
253
+ optionsGBRDT[:Merchant]= "2153"
254
+ optionsGBRDT[:STARTDATE]= "2017-01-01"
255
+ optionsGBRDT[:ENDDATE]= "2017-02-30"
256
+ optionsGBRDT[:PAGENUMBER] = 1
257
+ if (test_condition=='fail')
258
+ optionsGBRDT[:Merchant]= "1111"
259
+ end
260
+
261
+ return optionsGBRDT
262
+ end
263
+
264
+ def GetByRangeDateTimeResponseOk
265
+ return '<OperationsColections xmlns="http://api.todopago.com.ar"><Operations><RESULTCODE>-1</RESULTCODE><RESULTMESSAGE>APROBADA</RESULTMESSAGE><DATETIME>2016-09-01T12:09:35.880-03:00</DATETIME><OPERATIONID>185</OPERATIONID><CURRENCYCODE>32</CURRENCYCODE><AMOUNT>3.00</AMOUNT><FEEAMOUNT>0.12</FEEAMOUNT><TAXAMOUNT>0.03</TAXAMOUNT><SERVICECHARGEAMOUNT xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></SERVICECHARGEAMOUNT><CREDITEDAMOUNT>2.85</CREDITEDAMOUNT><AMOUNTBUYER>3.00</AMOUNTBUYER><FEEAMOUNTBUYER xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></FEEAMOUNTBUYER><TAXAMOUNTBUYER xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></TAXAMOUNTBUYER><CREDITEDAMOUNTBUYER>3.00</CREDITEDAMOUNTBUYER><BANKID>18</BANKID><PROMOTIONID>148047</PROMOTIONID><TYPE>compra_online</TYPE><INSTALLMENTPAYMENTS>1</INSTALLMENTPAYMENTS><CUSTOMEREMAIL>elenagaivironsky@hotmail.com</CUSTOMEREMAIL><IDENTIFICATIONTYPE>DNI</IDENTIFICATIONTYPE><IDENTIFICATION>13415824</IDENTIFICATION><CARDNUMBER>45097901XXXXXX5600</CARDNUMBER><CARDHOLDERNAME>Mauricio Ghiorzi</CARDHOLDERNAME><TICKETNUMBER>5190</TICKETNUMBER><AUTHORIZATIONCODE>004675</AUTHORIZATIONCODE><BARCODE xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></BARCODE><COUPONEXPDATE xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></COUPONEXPDATE><COUPONSECEXPDATE xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></COUPONSECEXPDATE><COUPONSUBSCRIBER xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></COUPONSUBSCRIBER><PAYMENTMETHODCODE>42</PAYMENTMETHODCODE><PAYMENTMETHODNAME>VISA</PAYMENTMETHODNAME><PAYMENTMETHODTYPE>Crédito</PAYMENTMETHODTYPE><REFUNDED>2016-09-01T15:29:28.500-03:00</REFUNDED><PUSHNOTIFYMETHOD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></PUSHNOTIFYMETHOD><PUSHNOTIFYENDPOINT xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></PUSHNOTIFYENDPOINT><PUSHNOTIFYSTATES xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></PUSHNOTIFYSTATES><IDCONTRACARGO>0</IDCONTRACARGO><FECHANOTIFICACIONCUENTA xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></FECHANOTIFICACIONCUENTA><ESTADOCONTRACARGO xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></ESTADOCONTRACARGO><COMISION>0.12</COMISION><REFUNDS><REFUND><ID>3788872</ID><AMOUNT>3.00</AMOUNT><DATETIME>2016-09-01T15:29:28.800-03:00</DATETIME></REFUND></REFUNDS></Operations><Operations><RESULTCODE>-1</RESULTCODE><RESULTMESSAGE>APROBADA</RESULTMESSAGE><DATETIME>2016-09-01T12:09:35.880-03:00</DATETIME><OPERATIONID>185</OPERATIONID><CURRENCYCODE>32</CURRENCYCODE><AMOUNT>3.00</AMOUNT><FEEAMOUNT>0.12</FEEAMOUNT><TAXAMOUNT>0.03</TAXAMOUNT><SERVICECHARGEAMOUNT xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></SERVICECHARGEAMOUNT><CREDITEDAMOUNT>2.85</CREDITEDAMOUNT><AMOUNTBUYER>3.00</AMOUNTBUYER><FEEAMOUNTBUYER xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></FEEAMOUNTBUYER><TAXAMOUNTBUYER xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></TAXAMOUNTBUYER><CREDITEDAMOUNTBUYER>3.00</CREDITEDAMOUNTBUYER><BANKID>18</BANKID><PROMOTIONID>148047</PROMOTIONID><TYPE>compra_online</TYPE><INSTALLMENTPAYMENTS>1</INSTALLMENTPAYMENTS><CUSTOMEREMAIL>elenagaivironsky@hotmail.com</CUSTOMEREMAIL><IDENTIFICATIONTYPE>DNI</IDENTIFICATIONTYPE><IDENTIFICATION>13415824</IDENTIFICATION><CARDNUMBER>45097901XXXXXX5600</CARDNUMBER><CARDHOLDERNAME>Mauricio Ghiorzi</CARDHOLDERNAME><TICKETNUMBER>5190</TICKETNUMBER><AUTHORIZATIONCODE>004675</AUTHORIZATIONCODE><BARCODE xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></BARCODE><COUPONEXPDATE xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></COUPONEXPDATE><COUPONSECEXPDATE xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></COUPONSECEXPDATE><COUPONSUBSCRIBER xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></COUPONSUBSCRIBER><PAYMENTMETHODCODE>42</PAYMENTMETHODCODE><PAYMENTMETHODNAME>VISA</PAYMENTMETHODNAME><PAYMENTMETHODTYPE>Crédito</PAYMENTMETHODTYPE><REFUNDED>2016-09-01T15:29:28.500-03:00</REFUNDED><PUSHNOTIFYMETHOD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></PUSHNOTIFYMETHOD><PUSHNOTIFYENDPOINT xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></PUSHNOTIFYENDPOINT><PUSHNOTIFYSTATES xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></PUSHNOTIFYSTATES><IDCONTRACARGO>0</IDCONTRACARGO><FECHANOTIFICACIONCUENTA xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></FECHANOTIFICACIONCUENTA><ESTADOCONTRACARGO xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></ESTADOCONTRACARGO><COMISION>0.12</COMISION><REFUNDS><REFUND><ID>3788872</ID><AMOUNT>3.00</AMOUNT><DATETIME>2016-09-01T15:29:28.800-03:00</DATETIME></REFUND></REFUNDS></Operations><Operations><RESULTCODE>-1</RESULTCODE><RESULTMESSAGE>APROBADA</RESULTMESSAGE><DATETIME>2016-09-01T12:09:35.880-03:00</DATETIME><OPERATIONID>185</OPERATIONID><CURRENCYCODE>32</CURRENCYCODE><AMOUNT>3.00</AMOUNT><FEEAMOUNT>0.12</FEEAMOUNT><TAXAMOUNT>0.03</TAXAMOUNT><SERVICECHARGEAMOUNT xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></SERVICECHARGEAMOUNT><CREDITEDAMOUNT>2.85</CREDITEDAMOUNT><AMOUNTBUYER>3.00</AMOUNTBUYER><FEEAMOUNTBUYER xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></FEEAMOUNTBUYER><TAXAMOUNTBUYER xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></TAXAMOUNTBUYER><CREDITEDAMOUNTBUYER>3.00</CREDITEDAMOUNTBUYER><BANKID>18</BANKID><PROMOTIONID>148047</PROMOTIONID><TYPE>compra_online</TYPE><INSTALLMENTPAYMENTS>1</INSTALLMENTPAYMENTS><CUSTOMEREMAIL>elenagaivironsky@hotmail.com</CUSTOMEREMAIL><IDENTIFICATIONTYPE>DNI</IDENTIFICATIONTYPE><IDENTIFICATION>13415824</IDENTIFICATION><CARDNUMBER>45097901XXXXXX5600</CARDNUMBER><CARDHOLDERNAME>Mauricio Ghiorzi</CARDHOLDERNAME><TICKETNUMBER>5190</TICKETNUMBER><AUTHORIZATIONCODE>004675</AUTHORIZATIONCODE><BARCODE xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></BARCODE><COUPONEXPDATE xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></COUPONEXPDATE><COUPONSECEXPDATE xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></COUPONSECEXPDATE><COUPONSUBSCRIBER xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></COUPONSUBSCRIBER><PAYMENTMETHODCODE>42</PAYMENTMETHODCODE><PAYMENTMETHODNAME>VISA</PAYMENTMETHODNAME><PAYMENTMETHODTYPE>Crédito</PAYMENTMETHODTYPE><REFUNDED>2016-09-01T15:29:28.500-03:00</REFUNDED><PUSHNOTIFYMETHOD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></PUSHNOTIFYMETHOD><PUSHNOTIFYENDPOINT xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></PUSHNOTIFYENDPOINT><PUSHNOTIFYSTATES xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></PUSHNOTIFYSTATES><IDCONTRACARGO>0</IDCONTRACARGO><FECHANOTIFICACIONCUENTA xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></FECHANOTIFICACIONCUENTA><ESTADOCONTRACARGO xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></ESTADOCONTRACARGO><COMISION>0.12</COMISION><REFUNDS><REFUND><ID>3788872</ID><AMOUNT>3.00</AMOUNT><DATETIME>2016-09-01T15:29:28.800-03:00</DATETIME></REFUND></REFUNDS></Operations></OperationsColections>'
266
+ end
267
+
268
+ def GetByRangeDateTimeResponseFail
269
+ return '<OperationsColections xmlns="http://api.todopago.com.ar"></OperationsColections>';
270
+ end
271
+
272
+
273
+ end
@@ -0,0 +1,71 @@
1
+ #encoding: utf-8
2
+ require_relative "../lib/todo_pago_conector.rb"
3
+ require_relative "../lib/Classes/user.rb"
4
+ require_relative "MockClient.rb"
5
+ require_relative "DataProvider.rb"
6
+
7
+ require "test/unit"
8
+
9
+
10
+ class DiscoverPaymentMethodsTest < Test::Unit::TestCase
11
+ attr_accessor :clientMock , :dataProvider
12
+
13
+ def testdiscoverPaymentMethodsOk
14
+ @dataProvider = DataProvider.new()
15
+ @clientMock = MockClient.new({}, "test")
16
+ sdk = TodoPagoConector.new({}, "test")
17
+
18
+ sdk.setRestConnector(@clientMock)
19
+ response = sdk.discoverPaymentMethods()
20
+
21
+ assert_equal(@dataProvider.discoverPaymentMethodsResponseOK, response)
22
+
23
+ end
24
+
25
+
26
+ def testdiscoverPaymentMethodsFail
27
+ @dataProvider = DataProvider.new()
28
+ @clientMock = MockClient.new({}, "test")
29
+ @clientMock.payments_ok = false
30
+ sdk = TodoPagoConector.new({}, "test")
31
+
32
+ sdk.setRestConnector(@clientMock)
33
+
34
+ response = sdk.discoverPaymentMethods()
35
+ assert_not_equal(@dataProvider.discoverPaymentMethodsResponseOK, response)
36
+ end
37
+
38
+ def testGetAllPaymentMethodsOk
39
+ @dataProvider = DataProvider.new()
40
+ @clientMock = MockClient.new({}, "test")
41
+ sdk = TodoPagoConector.new({}, "test")
42
+
43
+ sdk.setRestConnector(@clientMock)
44
+ optionsPaymentMethods=Hash.new
45
+ optionsPaymentMethods[:MERCHANT]= "2153"
46
+
47
+ response = sdk.getAllPaymentMethods(optionsPaymentMethods)
48
+
49
+
50
+ assert_equal(@dataProvider.GetAllPaymentMethodsResponseOK, response)
51
+ end
52
+
53
+ def testGetAllPaymentMethodsFail
54
+ @dataProvider = DataProvider.new()
55
+ @clientMock = MockClient.new({}, "test")
56
+ @clientMock.payments_ok = false
57
+ sdk = TodoPagoConector.new({}, "test")
58
+
59
+ sdk.setRestConnector(@clientMock)
60
+ optionsPaymentMethods=Hash.new
61
+ optionsPaymentMethods[:MERCHANT]= "5555"
62
+
63
+ response = sdk.getAllPaymentMethods(optionsPaymentMethods)
64
+
65
+
66
+ assert_not_equal(@dataProvider.GetAllPaymentMethodsResponseOK, response)
67
+ end
68
+
69
+
70
+
71
+ end
@@ -0,0 +1,61 @@
1
+ #encoding: utf-8
2
+ require_relative "../lib/todo_pago_conector.rb"
3
+ require_relative "MockClient.rb"
4
+ require_relative "DataProvider.rb"
5
+
6
+ require "test/unit"
7
+
8
+
9
+ class GetAuthorizeAnswerTest < Test::Unit::TestCase
10
+ attr_accessor :clientMock , :dataProvider
11
+
12
+ def testGetAuthorizeRequestOk
13
+ @dataProvider = DataProvider.new()
14
+ @clientMock = MockClient.new( @dataProvider.getHeader(), "test")
15
+ sdk = TodoPagoConector.new(@dataProvider.getHeader(), "test")
16
+
17
+ sdk.setSoapConnector(@clientMock)
18
+
19
+ params = @dataProvider.GetAuthorizeAnswerOptions('ok')
20
+ response = sdk.getAuthorizeAnswer(params)
21
+ response = JSON.parse(response)
22
+
23
+ assert_equal(@dataProvider.GetAuthorizeAnswerRequestOK(), @clientMock.getLastRequest());
24
+ assert_equal("-1", response["envelope"]["body"]["get_authorize_answer_response"]["status_code"])
25
+
26
+ end
27
+
28
+ def testGetAuthorizeRequestFail
29
+ @dataProvider = DataProvider.new()
30
+ @clientMock = MockClient.new( @dataProvider.getHeader(), "test")
31
+ sdk = TodoPagoConector.new(@dataProvider.getHeader(), "test")
32
+
33
+ sdk.setSoapConnector(@clientMock)
34
+
35
+ params = @dataProvider.GetAuthorizeAnswerOptions('fail_required')
36
+
37
+ response = sdk.getAuthorizeAnswer(params)
38
+ response = JSON.parse(response)
39
+
40
+ assert_not_equal("-1", response["envelope"]["body"]["get_authorize_answer_response"]["status_code"])
41
+
42
+ end
43
+
44
+ def testGetAuthorizeRequest702
45
+ @dataProvider = DataProvider.new()
46
+ @clientMock = MockClient.new( @dataProvider.getHeader(), "test")
47
+ sdk = TodoPagoConector.new(@dataProvider.getHeader(), "test")
48
+
49
+ sdk.setSoapConnector(@clientMock)
50
+
51
+ params = @dataProvider.GetAuthorizeAnswerOptions('702')
52
+
53
+ response = sdk.getAuthorizeAnswer(params)
54
+ response = JSON.parse(response)
55
+
56
+ assert_equal("702", response["envelope"]["body"]["get_authorize_answer_response"]["status_code"])
57
+
58
+ end
59
+
60
+
61
+ end
@@ -0,0 +1,70 @@
1
+ #encoding: utf-8
2
+ require_relative "../lib/todo_pago_conector.rb"
3
+ require_relative "../lib/Classes/user.rb"
4
+ require_relative "MockClient.rb"
5
+ require_relative "DataProvider.rb"
6
+
7
+ require "test/unit"
8
+
9
+
10
+ class GetCredentialsTest < Test::Unit::TestCase
11
+ attr_accessor :clientMock , :dataProvider
12
+
13
+ def testGetCredentialsOk
14
+ @dataProvider = DataProvider.new()
15
+
16
+ @clientMock = MockClient.new({}, "test")
17
+ sdk = TodoPagoConector.new({}, "test")
18
+
19
+ sdk.setRestConnector(@clientMock)
20
+
21
+ params = @dataProvider.GetCredentialsOptions('ok')
22
+
23
+ u = User.new(params[:user], params[:password])
24
+
25
+ response = sdk.getCredentials(u)
26
+ # assert_equal(@dataProvider.GetOperationsRequestOk(), @clientMock.getLastRequest());
27
+ assert_instance_of(User,response)
28
+ assert_equal(2153, response.merchant)
29
+ assert_equal("TODOPAGO f3d8b72c94ab4a06be2ef7c95490f7d3", response.apiKey)
30
+
31
+
32
+ end
33
+
34
+ def testGetCredentialsFailUser
35
+ @dataProvider = DataProvider.new()
36
+
37
+ @clientMock = MockClient.new({}, "test")
38
+ sdk = TodoPagoConector.new({}, "test")
39
+
40
+ sdk.setRestConnector(@clientMock)
41
+
42
+ params = @dataProvider.GetCredentialsOptions('failUser')
43
+
44
+ u = User.new(params[:user], params[:password])
45
+
46
+ response = sdk.getCredentials(u)
47
+
48
+ assert_equal(1050, response['Credentials']['resultado']['codigoResultado'])
49
+
50
+ end
51
+
52
+ def testGetCredentialsFailPassword
53
+ @dataProvider = DataProvider.new()
54
+
55
+ @clientMock = MockClient.new({}, "test")
56
+ sdk = TodoPagoConector.new({}, "test")
57
+
58
+ sdk.setRestConnector(@clientMock)
59
+
60
+ params = @dataProvider.GetCredentialsOptions('failPassword')
61
+
62
+ u = User.new(params[:user], params[:password])
63
+
64
+ response = sdk.getCredentials(u)
65
+ assert_equal(1055, response['Credentials']['resultado']['codigoResultado'])
66
+
67
+ end
68
+
69
+
70
+ end