TodoPagoConectorSS 1.7.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/todo_pago_conector.rb +108 -0
  3. metadata +85 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 30f4b752c3c3b2ee188d9d03f9d55d169c15ee57
4
+ data.tar.gz: ff4a87eb012a20b943aa9fb2a0aed8b31514c854
5
+ SHA512:
6
+ metadata.gz: 1ec467e304581aebde5dfa5a5fa4860c5c0b2b06a469a8b6e559cdb5ea8c33123bf6960b5fd116ff9e20441ec7440492b81be2cc0eb7df0522ae497e6f236741
7
+ data.tar.gz: 518616d40dc1a053fa3b3bb39cb26b4493385d4a3ef95ee0a7fcff24c93bea40fe904d8e11dd45f39f5b8a090385f1310ecdcadc5388a172f52d9ce3e0f76f4e
@@ -0,0 +1,108 @@
1
+ #encoding: utf-8
2
+
3
+ require_relative "Connectors/RestConnector"
4
+ require_relative "Connectors/SoapConnector"
5
+
6
+ $versionTodoPago = '1.7.0'
7
+
8
+ class TodoPagoConector
9
+ # método inicializar clase
10
+ def initialize(j_header_http, *args)#j_wsdl=nil, endpoint=nil, env=nil
11
+ @discover = nil
12
+ @Fcv = nil
13
+ @restConnector = RestConnector.new(j_header_http, args)
14
+ @soapConnector = SoapConnector.new(j_header_http, args)
15
+ end
16
+
17
+ def setSoapConnector(soapConnector)
18
+ @soapConnector = soapConnector
19
+ end
20
+
21
+ def setRestConnector(restConnector)
22
+ @restConnector = restConnector
23
+ end
24
+
25
+
26
+ ######################################################################################
27
+ # => Public method that calls first function service sendAuthorizeRequest ###
28
+ ######################################################################################
29
+ def sendAuthorizeRequest(options_commerce, optionsAuthorize)
30
+ return @soapConnector.sendAuthorizeRequest(options_commerce, optionsAuthorize)
31
+ end
32
+
33
+ #####################################################################################
34
+ ###Método público que llama a la segunda funcion del servicio GetAuthorizeAnswer###
35
+ #####################################################################################
36
+ # <b>DEPRECATED:</b> Please use <tt>getAuthorizeAnswer</tt> instead.
37
+ def getAuthorizeRequest(optionsAnwser)
38
+ warn "[DEPRECATION] 'getAuthorizeRequest' is deprecated. Please use 'getAuthorizeAnswer' instead."
39
+ return getAuthorizeAnswer(optionsAnwser)
40
+ end
41
+
42
+ def getAuthorizeAnswer(optionsAnwser)
43
+ return @soapConnector.getAuthorizeAnswer(optionsAnwser)
44
+ end
45
+
46
+ ############################################################
47
+ ###Método público que retorna el status de una operacion###
48
+ ############################################################
49
+ def getOperations(optionsOperations)
50
+ return @restConnector.getOperations(optionsOperations)
51
+ end
52
+
53
+ ################################################################
54
+ ###Método público que descubre todas las promociones de pago###
55
+ ################################################################
56
+ def getAllPaymentMethods(optionsPaymentMethod)
57
+ return @restConnector.getAllPaymentMethods(optionsPaymentMethod)
58
+ end
59
+
60
+ ##############################################################################
61
+ ###Método público que descubre todas las operaciones en un rango de fechas###
62
+ ##############################################################################
63
+ ##$url = $this->end_point.TODOPAGO_ENDPOINT_TENATN.'api/Operations/GetByRangeDateTime/MERCHANT/'. $arr_datos["MERCHANT"] . '/STARTDATE/' . $arr_datos["STARTDATE"] . '/ENDDATE/' . $arr_datos["ENDDATE"] . '/PAGENUMBER/' . $arr_datos["PAGENUMBER"];
64
+ def getByRangeDateTime(optionsGetByRange)
65
+ return @restConnector.getByRangeDateTime(optionsGetByRange)
66
+ end
67
+
68
+ ##############################################################################
69
+ ###Devolución ###
70
+ ##############################################################################
71
+ def returnRequest(refoundOptions)
72
+ return @soapConnector.returnRequest(refoundOptions)
73
+ end
74
+
75
+ def voidRequest(refoundOptions)
76
+ return @soapConnector.voidRequest(refoundOptions)
77
+ end
78
+
79
+ ########################################################################
80
+ ### GETCREDENTIALS######################################################
81
+ ########################################################################
82
+ def getCredentials(user)
83
+ return @restConnector.getCredentials(user)
84
+ end
85
+
86
+ ######################################################
87
+ ###Methodo público que descubre los metodos de pago###
88
+ ######################################################
89
+ def discoverPaymentMethods()
90
+ return @restConnector.discoverPaymentMethods();
91
+ end
92
+
93
+ ##############################################################################
94
+ ###Método público que verifica el estado de los servicios de TodoPago ###
95
+ ##############################################################################
96
+ def healthCheck()
97
+ result = (echoService("EchoServiceDSS") and echoService("EchoServiceESB"))
98
+ return result
99
+ end
100
+
101
+ protected
102
+ def echoService(serviceName)
103
+ return @soapConnector.echoService(serviceName)
104
+ end
105
+
106
+ end
107
+
108
+
metadata ADDED
@@ -0,0 +1,85 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: TodoPagoConectorSS
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.7.2
5
+ platform: ruby
6
+ authors:
7
+ - Softtek
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-10-13 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: savon
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '='
18
+ - !ruby/object:Gem::Version
19
+ version: 2.8.1
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '='
25
+ - !ruby/object:Gem::Version
26
+ version: 2.8.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: rest-client
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '='
32
+ - !ruby/object:Gem::Version
33
+ version: 1.8.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '='
39
+ - !ruby/object:Gem::Version
40
+ version: 1.8.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: json
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: Conector para la plataforma de pagos
56
+ email:
57
+ executables: []
58
+ extensions: []
59
+ extra_rdoc_files: []
60
+ files:
61
+ - lib/todo_pago_conector.rb
62
+ homepage:
63
+ licenses: []
64
+ metadata: {}
65
+ post_install_message:
66
+ rdoc_options: []
67
+ require_paths:
68
+ - lib
69
+ required_ruby_version: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ version: '0'
74
+ required_rubygems_version: !ruby/object:Gem::Requirement
75
+ requirements:
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ version: '0'
79
+ requirements: []
80
+ rubyforge_project:
81
+ rubygems_version: 2.6.14.1
82
+ signing_key:
83
+ specification_version: 4
84
+ summary: test conector
85
+ test_files: []