rbraspag 0.0.9 → 0.0.10

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.
data/lib/rbraspag/bill.rb CHANGED
@@ -1,8 +1,9 @@
1
1
  require "bigdecimal"
2
2
 
3
3
  module Braspag
4
- class Bill
5
- PAYMENT_METHOD = {
4
+ class Bill < PaymentMethod
5
+
6
+ PAYMENT_METHODS = {
6
7
  :bradesco => "06",
7
8
  :cef => "07",
8
9
  :hsbc => "08",
@@ -75,7 +76,7 @@ module Braspag
75
76
  raise InvalidExpirationDate unless @params[:expiration_date].to_s =~ date_regexp
76
77
  end
77
78
 
78
- unless @params[:payment_method].is_a?(Symbol) && PAYMENT_METHOD[@params[:payment_method]]
79
+ unless @params[:payment_method].is_a?(Symbol) && PAYMENT_METHODS[@params[:payment_method]]
79
80
  raise InvalidPaymentMethod
80
81
  end
81
82
 
@@ -85,7 +86,7 @@ module Braspag
85
86
  def generate
86
87
  data = MAPPING.inject({}) do |memo, k|
87
88
  if k[0] == :payment_method
88
- memo[k[1]] = PAYMENT_METHOD[@params[:payment_method]]
89
+ memo[k[1]] = PAYMENT_METHODS[@params[:payment_method]]
89
90
  elsif k[0] == :amount
90
91
  memo[k[1]] = Utils.convert_decimal_to_string(@params[:amount])
91
92
  else
@@ -1,5 +1,5 @@
1
1
  module Braspag
2
- class CreditCard
2
+ class CreditCard < PaymentMethod
3
3
 
4
4
  PAYMENT_METHODS = {
5
5
  # BRASIL
data/lib/rbraspag/eft.rb CHANGED
@@ -1,12 +1,12 @@
1
1
  module Braspag
2
- class Eft
3
- PAYMENT_METHOD = {
4
- :bradesco => "11",
5
- :itau => "12",
6
- :banco_do_brasil => "15",
7
- :banco_real => "16",
8
- :banrisul => "30",
9
- :unibanco => "31"
2
+ class Eft < PaymentMethod
3
+ PAYMENT_METHODS = {
4
+ :bradesco => 11,
5
+ :itau => 12,
6
+ :banco_do_brasil => 15,
7
+ :banco_real => 16,
8
+ :banrisul => 30,
9
+ :unibanco => 31
10
10
  }
11
11
 
12
12
  MAPPING = {
@@ -94,7 +94,7 @@ module Braspag
94
94
  def create_data_from_params
95
95
  MAPPING.inject({}) do |memo, k|
96
96
  if k[0] == :payment_method
97
- memo[k[1]] = PAYMENT_METHOD[@params[:payment_method]]
97
+ memo[k[1]] = PAYMENT_METHODS[@params[:payment_method]]
98
98
  elsif k[0] == :amount
99
99
  memo[k[1]] = convert_decimal_to_string(@params[:amount])
100
100
  else
@@ -0,0 +1,7 @@
1
+ module Braspag
2
+ class PaymentMethod
3
+ def self.payment_method_from_id(code)
4
+ self::PAYMENT_METHODS.invert.values_at(code).first
5
+ end
6
+ end
7
+ end
@@ -7,4 +7,5 @@ module Braspag
7
7
  "#{integer},#{cents}"
8
8
  end
9
9
  end
10
+
10
11
  end
@@ -1,3 +1,3 @@
1
1
  module Braspag
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
data/lib/rbraspag.rb CHANGED
@@ -13,6 +13,7 @@ require "nokogiri"
13
13
  Bundler.require(:default, ENV["RACK_ENV"].to_sym)
14
14
 
15
15
  require 'rbraspag/connection'
16
+ require 'rbraspag/payment_method'
16
17
  require 'rbraspag/crypto/jar_webservice'
17
18
  require 'rbraspag/crypto/webservice'
18
19
  require 'rbraspag/bill'
data/spec/bill_spec.rb CHANGED
@@ -480,5 +480,12 @@ describe Braspag::Bill do
480
480
  FakeWeb.clean_registry
481
481
  end
482
482
  end
483
+
484
+ context "#payment_method_from_id" do
485
+ it 'Credit card amex' do
486
+ Braspag::Bill::payment_method_from_id("06").should == :bradesco
487
+ Braspag::Bill::payment_method_from_id("06").should be_kind_of Symbol
488
+ end
489
+ end
483
490
  end
484
491
  end
@@ -464,6 +464,13 @@ describe Braspag::CreditCard do
464
464
 
465
465
  end
466
466
 
467
+ context ".payment_method_from_id" do
468
+ it 'Credit card amex' do
469
+ Braspag::CreditCard::payment_method_from_id(18).should == :amex_2p
470
+ Braspag::CreditCard::payment_method_from_id(18).should be_kind_of Symbol
471
+ end
472
+ end
473
+
467
474
  end
468
475
 
469
476
  end
data/spec/eft_spec.rb CHANGED
@@ -9,147 +9,147 @@ describe Braspag::Eft do
9
9
 
10
10
  describe ".new" do
11
11
 
12
- it "should raise an error when no connection is given" do
13
- expect {
14
- Braspag::Eft.new("", {})
15
- }.to raise_error(Braspag::InvalidConnection)
16
- end
17
-
18
- it "should raise an error when :order_id is not present" do
19
- expect {
20
- Braspag::Eft.new(connection, {
21
- :amount => "100.00",
22
- :payment_method => :bradesco
23
- })
24
- }.to raise_error(Braspag::IncompleteParams)
25
- end
26
-
27
- it "should raise an error when :amount is not present" do
28
- expect {
29
- Braspag::Eft.new(connection, {
12
+ it "should raise an error when no connection is given" do
13
+ expect {
14
+ Braspag::Eft.new("", {})
15
+ }.to raise_error(Braspag::InvalidConnection)
16
+ end
17
+
18
+ it "should raise an error when :order_id is not present" do
19
+ expect {
20
+ Braspag::Eft.new(connection, {
21
+ :amount => "100.00",
22
+ :payment_method => :bradesco
23
+ })
24
+ }.to raise_error(Braspag::IncompleteParams)
25
+ end
26
+
27
+ it "should raise an error when :amount is not present" do
28
+ expect {
29
+ Braspag::Eft.new(connection, {
30
30
  :order_id => "12",
31
31
  :payment_method => :bradesco
32
32
  })
33
- }.to raise_error(Braspag::IncompleteParams)
34
- end
35
-
36
- it "should raise an error when :payment_method is not present" do
37
- expect {
38
- Braspag::Eft.new(connection, {
39
- :order_id => "13",
40
- :amount => "120.00"
41
- })
42
- }.to raise_error(Braspag::IncompleteParams)
43
- end
44
-
45
- it "should raise an error when :order_id is less than 1 character" do
46
- expect {
47
- Braspag::Eft.new(connection, {
48
- :order_id => "",
49
- :amount => "123.00",
50
- :payment_method => :bradesco
51
- })
52
- }.to raise_error(Braspag::InvalidOrderId)
53
- end
54
-
55
- it "should raise an error when :order_id is more than 50 characters" do
56
- expect {
57
- Braspag::Eft.new(connection, {
58
- :order_id => "1" * 51,
59
- :amount => "12.00",
60
- :payment_method => :bradesco
61
- })
62
- }.to raise_error(Braspag::InvalidOrderId)
63
- end
64
-
65
- it "should raise an error when :customer_name is less than 1 character" do
66
- expect {
67
- Braspag::Eft.new(connection, {
68
- :order_id => "102",
69
- :amount => "42.00",
70
- :payment_method => :bradesco,
71
- :customer_name => ""
72
- })
73
- }.to raise_error(Braspag::InvalidCustomerName)
74
- end
75
-
76
- it "should raise an error when :customer_name is more than 255 characters" do
77
- expect {
78
- Braspag::Eft.new(connection, {
79
- :order_id => "112",
80
- :amount => "121.00",
81
- :payment_method => :bradesco,
82
- :customer_name => "A" * 256
83
- })
84
- }.to raise_error(Braspag::InvalidCustomerName)
85
- end
86
-
87
- it "should raise an error when :customer_id is less than 11 characters" do
88
- expect {
89
- Braspag::Eft.new(connection, {
90
- :order_id => "23",
91
- :amount => "251.00",
92
- :payment_method => :bradesco,
93
- :customer_id => "2" * 10
94
- })
95
- }.to raise_error(Braspag::InvalidCustomerId)
96
- end
97
-
98
- it "should raise an error when :customer_id is more than 18 characters" do
99
- expect {
100
- Braspag::Eft.new(connection, {
101
- :order_id => "90",
102
- :amount => "90.00",
103
- :payment_method => :bradesco,
104
- :customer_id => "3" * 19
105
- })
106
- }.to raise_error(Braspag::InvalidCustomerId)
107
- end
108
-
109
- it "should raise an error when :installments is less than 1 character" do
110
- expect {
111
- Braspag::Eft.new(connection, {
112
- :order_id => "900",
113
- :amount => "92.00",
114
- :payment_method => :bradesco,
115
- :installments => ""
116
- })
117
- }.to raise_error(Braspag::InvalidInstallments)
118
- end
119
-
120
- it "should raise an error when :installments is more than 2 characters" do
121
- expect {
122
- Braspag::Eft.new(connection, {
123
- :order_id => "91",
124
- :amount => "80.00",
125
- :payment_method => :bradesco,
126
- :installments => "5" * 3
127
- })
128
- }.to raise_error(Braspag::InvalidInstallments)
129
- end
33
+ }.to raise_error(Braspag::IncompleteParams)
34
+ end
35
+
36
+ it "should raise an error when :payment_method is not present" do
37
+ expect {
38
+ Braspag::Eft.new(connection, {
39
+ :order_id => "13",
40
+ :amount => "120.00"
41
+ })
42
+ }.to raise_error(Braspag::IncompleteParams)
43
+ end
44
+
45
+ it "should raise an error when :order_id is less than 1 character" do
46
+ expect {
47
+ Braspag::Eft.new(connection, {
48
+ :order_id => "",
49
+ :amount => "123.00",
50
+ :payment_method => :bradesco
51
+ })
52
+ }.to raise_error(Braspag::InvalidOrderId)
53
+ end
54
+
55
+ it "should raise an error when :order_id is more than 50 characters" do
56
+ expect {
57
+ Braspag::Eft.new(connection, {
58
+ :order_id => "1" * 51,
59
+ :amount => "12.00",
60
+ :payment_method => :bradesco
61
+ })
62
+ }.to raise_error(Braspag::InvalidOrderId)
63
+ end
64
+
65
+ it "should raise an error when :customer_name is less than 1 character" do
66
+ expect {
67
+ Braspag::Eft.new(connection, {
68
+ :order_id => "102",
69
+ :amount => "42.00",
70
+ :payment_method => :bradesco,
71
+ :customer_name => ""
72
+ })
73
+ }.to raise_error(Braspag::InvalidCustomerName)
74
+ end
75
+
76
+ it "should raise an error when :customer_name is more than 255 characters" do
77
+ expect {
78
+ Braspag::Eft.new(connection, {
79
+ :order_id => "112",
80
+ :amount => "121.00",
81
+ :payment_method => :bradesco,
82
+ :customer_name => "A" * 256
83
+ })
84
+ }.to raise_error(Braspag::InvalidCustomerName)
85
+ end
86
+
87
+ it "should raise an error when :customer_id is less than 11 characters" do
88
+ expect {
89
+ Braspag::Eft.new(connection, {
90
+ :order_id => "23",
91
+ :amount => "251.00",
92
+ :payment_method => :bradesco,
93
+ :customer_id => "2" * 10
94
+ })
95
+ }.to raise_error(Braspag::InvalidCustomerId)
96
+ end
97
+
98
+ it "should raise an error when :customer_id is more than 18 characters" do
99
+ expect {
100
+ Braspag::Eft.new(connection, {
101
+ :order_id => "90",
102
+ :amount => "90.00",
103
+ :payment_method => :bradesco,
104
+ :customer_id => "3" * 19
105
+ })
106
+ }.to raise_error(Braspag::InvalidCustomerId)
107
+ end
108
+
109
+ it "should raise an error when :installments is less than 1 character" do
110
+ expect {
111
+ Braspag::Eft.new(connection, {
112
+ :order_id => "900",
113
+ :amount => "92.00",
114
+ :payment_method => :bradesco,
115
+ :installments => ""
116
+ })
117
+ }.to raise_error(Braspag::InvalidInstallments)
118
+ end
119
+
120
+ it "should raise an error when :installments is more than 2 characters" do
121
+ expect {
122
+ Braspag::Eft.new(connection, {
123
+ :order_id => "91",
124
+ :amount => "80.00",
125
+ :payment_method => :bradesco,
126
+ :installments => "5" * 3
127
+ })
128
+ }.to raise_error(Braspag::InvalidInstallments)
129
+ end
130
130
 
131
131
  it "should raise an error when :installments is not a number" do
132
- expect {
133
- Braspag::Eft.new(connection, {
132
+ expect {
133
+ Braspag::Eft.new(connection, {
134
134
  :order_id => "91",
135
135
  :amount => "80.00",
136
136
  :payment_method => :bradesco,
137
137
  :installments => "A" * 2
138
138
  })
139
- }.to raise_error(Braspag::InvalidInstallments)
139
+ }.to raise_error(Braspag::InvalidInstallments)
140
140
  end
141
141
 
142
- it "should raise an error when :has_interest is not boolean" do
143
- expect {
144
- Braspag::Eft.new(connection, {
145
- :order_id => "76",
146
- :amount => "50.00",
147
- :payment_method => :bradesco,
148
- :has_interest => []
149
- })
150
- }.to raise_error(Braspag::InvalidHasInterest)
151
- end
152
- end
142
+ it "should raise an error when :has_interest is not boolean" do
143
+ expect {
144
+ Braspag::Eft.new(connection, {
145
+ :order_id => "76",
146
+ :amount => "50.00",
147
+ :payment_method => :bradesco,
148
+ :has_interest => []
149
+ })
150
+ }.to raise_error(Braspag::InvalidHasInterest)
151
+ end
152
+ end
153
153
 
154
154
  describe ".generate" do
155
155
  let!(:crypto_key) {"{84BE7E7F-698A-6C74-F820-AE359C2A07C2}"}
@@ -157,8 +157,8 @@ describe Braspag::Eft do
157
157
  let!(:braspag_crypto_webservice) {Braspag::Crypto::Webservice.new(connection)}
158
158
 
159
159
 
160
- it "should return form fields in strategy without crypto" do
161
- html = <<-EOHTML
160
+ it "should return form fields in strategy without crypto" do
161
+ html = <<-EOHTML
162
162
  <form id="form_tef_1234123125" name="form_tef_1234123125" action="https://homologacao.pagador.com.br/pagador/passthru.asp" method="post">
163
163
  <input type="text" name="Id_Loja" value="{84BE7E7F-698A-6C74-F820-AE359C2A07C2}" />
164
164
  <input type="text" name="VendaId" value="1234123125" />
@@ -172,24 +172,24 @@ describe Braspag::Eft do
172
172
  <script type="text/javascript" charset="utf-8">
173
173
  document.forms["form_tef_1234123125"].submit();
174
174
  </script>
175
- EOHTML
175
+ EOHTML
176
176
 
177
- Braspag::Eft.new(connection , {
177
+ Braspag::Eft.new(connection , {
178
178
  :order_id => "1234123125",
179
179
  :amount => "123.00",
180
180
  :payment_method => :bradesco
181
181
  }).generate.should == html
182
- end
182
+ end
183
183
 
184
- it "should return form fields in strategy with braspag.jar crypto service" do
185
- FakeWeb.register_uri(:post,
186
- "http://localhost:9292/v1/encrypt.json",
187
- :body => <<-EOJSON
184
+ it "should return form fields in strategy with braspag.jar crypto service" do
185
+ FakeWeb.register_uri(:post,
186
+ "http://localhost:9292/v1/encrypt.json",
187
+ :body => <<-EOJSON
188
188
  {"encrypt":"5u0ZN5qk8eQNuuGPHrcsk0rfi7YclF6s+ZXCE+G4uG4ztfRJrrOALlf81ra7k7p7"}
189
- EOJSON
190
- )
189
+ EOJSON
190
+ )
191
191
 
192
- html = <<-EOHTML
192
+ html = <<-EOHTML
193
193
  <form id="form_tef_1234123125" name="form_tef_1234123125" action="https://homologacao.pagador.com.br/pagador/passthru.asp" method="post">
194
194
  <input type="text" name="crypt" value="5u0ZN5qk8eQNuuGPHrcsk0rfi7YclF6s+ZXCE+G4uG4ztfRJrrOALlf81ra7k7p7" />
195
195
  <input type="text" name="Id_Loja" value="{84BE7E7F-698A-6C74-F820-AE359C2A07C2}" />
@@ -197,26 +197,26 @@ describe Braspag::Eft do
197
197
  <script type="text/javascript" charset="utf-8">
198
198
  document.forms["form_tef_1234123125"].submit();
199
199
  </script>
200
- EOHTML
200
+ EOHTML
201
201
 
202
- Braspag::Eft.new(connection , {
203
- :order_id => "1234123125",
204
- :amount => "123.00",
205
- :payment_method => :bradesco
206
- } , braspag_crypto_jar_webservice ).generate.should == html
202
+ Braspag::Eft.new(connection , {
203
+ :order_id => "1234123125",
204
+ :amount => "123.00",
205
+ :payment_method => :bradesco
206
+ } , braspag_crypto_jar_webservice ).generate.should == html
207
207
 
208
- FakeWeb.clean_registry
208
+ FakeWeb.clean_registry
209
209
 
210
- end
210
+ end
211
211
 
212
- let!(:key) { "12312312312313123123" }
213
- it "should return form fields in strategy with braspag crypto webservice" do
212
+ let!(:key) { "12312312312313123123" }
213
+ it "should return form fields in strategy with braspag crypto webservice" do
214
214
 
215
- FakeWeb.register_uri(:post,
216
- "https://homologacao.pagador.com.br/BraspagGeneralService/BraspagGeneralService.asmx",
217
- :body => "<?xml version='1.0' encoding='utf-8'?><soap:Envelope xmlns:soap='http://www.w3.org/2003/05/soap-envelope' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema'><soap:Body><EncryptRequestResponse xmlns='https://www.pagador.com.br/webservice/BraspagGeneralService'><EncryptRequestResult>#{key}</EncryptRequestResult></EncryptRequestResponse></soap:Body></soap:Envelope>" )
215
+ FakeWeb.register_uri(:post,
216
+ "https://homologacao.pagador.com.br/BraspagGeneralService/BraspagGeneralService.asmx",
217
+ :body => "<?xml version='1.0' encoding='utf-8'?><soap:Envelope xmlns:soap='http://www.w3.org/2003/05/soap-envelope' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema'><soap:Body><EncryptRequestResponse xmlns='https://www.pagador.com.br/webservice/BraspagGeneralService'><EncryptRequestResult>#{key}</EncryptRequestResult></EncryptRequestResponse></soap:Body></soap:Envelope>" )
218
218
 
219
- html = <<-EOHTML
219
+ html = <<-EOHTML
220
220
  <form id="form_tef_1234123125" name="form_tef_1234123125" action="https://homologacao.pagador.com.br/pagador/passthru.asp" method="post">
221
221
  <input type="text" name="crypt" value="#{key}" />
222
222
  <input type="text" name="Id_Loja" value="{84BE7E7F-698A-6C74-F820-AE359C2A07C2}" />
@@ -224,19 +224,25 @@ describe Braspag::Eft do
224
224
  <script type="text/javascript" charset="utf-8">
225
225
  document.forms["form_tef_1234123125"].submit();
226
226
  </script>
227
- EOHTML
227
+ EOHTML
228
228
 
229
- Braspag::Eft.new(connection , {
230
- :order_id => "1234123125",
231
- :amount => "123.00",
232
- :payment_method => :bradesco
233
- } , braspag_crypto_webservice ).generate.should == html
229
+ Braspag::Eft.new(connection , {
230
+ :order_id => "1234123125",
231
+ :amount => "123.00",
232
+ :payment_method => :bradesco
233
+ } , braspag_crypto_webservice ).generate.should == html
234
234
 
235
- FakeWeb.clean_registry
235
+ FakeWeb.clean_registry
236
236
 
237
+ end
238
+
239
+ context ".payment_method_from_id" do
240
+ it 'Eft' do
241
+ Braspag::Eft.payment_method_from_id(31).should == :unibanco
242
+ Braspag::Eft.payment_method_from_id(31).should be_kind_of Symbol
237
243
  end
238
-
244
+ end
239
245
 
240
- end
246
+ end
241
247
 
242
248
  end
@@ -0,0 +1,8 @@
1
+ #encoding: utf-8
2
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
3
+
4
+ describe Braspag::Utils do
5
+ it '.convert_decimal_to_string' do
6
+ Braspag::Utils.convert_decimal_to_string(10.80).should == "10,80"
7
+ end
8
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbraspag
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -14,12 +14,12 @@ authors:
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2011-07-15 00:00:00.000000000 -03:00
17
+ date: 2011-07-27 00:00:00.000000000 -03:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: cs-httpi
22
- requirement: &69406810 !ruby/object:Gem::Requirement
22
+ requirement: &74919890 !ruby/object:Gem::Requirement
23
23
  none: false
24
24
  requirements:
25
25
  - - ! '>='
@@ -27,10 +27,10 @@ dependencies:
27
27
  version: 0.9.5.2
28
28
  type: :runtime
29
29
  prerelease: false
30
- version_requirements: *69406810
30
+ version_requirements: *74919890
31
31
  - !ruby/object:Gem::Dependency
32
32
  name: json
33
- requirement: &69406600 !ruby/object:Gem::Requirement
33
+ requirement: &74919680 !ruby/object:Gem::Requirement
34
34
  none: false
35
35
  requirements:
36
36
  - - ! '>='
@@ -38,10 +38,10 @@ dependencies:
38
38
  version: '0'
39
39
  type: :runtime
40
40
  prerelease: false
41
- version_requirements: *69406600
41
+ version_requirements: *74919680
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: nokogiri
44
- requirement: &69378790 !ruby/object:Gem::Requirement
44
+ requirement: &74919450 !ruby/object:Gem::Requirement
45
45
  none: false
46
46
  requirements:
47
47
  - - ! '>='
@@ -49,10 +49,10 @@ dependencies:
49
49
  version: '0'
50
50
  type: :runtime
51
51
  prerelease: false
52
- version_requirements: *69378790
52
+ version_requirements: *74919450
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: rspec
55
- requirement: &69378570 !ruby/object:Gem::Requirement
55
+ requirement: &74919240 !ruby/object:Gem::Requirement
56
56
  none: false
57
57
  requirements:
58
58
  - - ! '>='
@@ -60,10 +60,10 @@ dependencies:
60
60
  version: '0'
61
61
  type: :development
62
62
  prerelease: false
63
- version_requirements: *69378570
63
+ version_requirements: *74919240
64
64
  - !ruby/object:Gem::Dependency
65
65
  name: fakeweb
66
- requirement: &69378350 !ruby/object:Gem::Requirement
66
+ requirement: &74919030 !ruby/object:Gem::Requirement
67
67
  none: false
68
68
  requirements:
69
69
  - - ! '>='
@@ -71,10 +71,10 @@ dependencies:
71
71
  version: '0'
72
72
  type: :development
73
73
  prerelease: false
74
- version_requirements: *69378350
74
+ version_requirements: *74919030
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: shoulda-matchers
77
- requirement: &69378120 !ruby/object:Gem::Requirement
77
+ requirement: &74918820 !ruby/object:Gem::Requirement
78
78
  none: false
79
79
  requirements:
80
80
  - - ! '>='
@@ -82,10 +82,10 @@ dependencies:
82
82
  version: '0'
83
83
  type: :development
84
84
  prerelease: false
85
- version_requirements: *69378120
85
+ version_requirements: *74918820
86
86
  - !ruby/object:Gem::Dependency
87
87
  name: guard-rspec
88
- requirement: &69377910 !ruby/object:Gem::Requirement
88
+ requirement: &74918610 !ruby/object:Gem::Requirement
89
89
  none: false
90
90
  requirements:
91
91
  - - ! '>='
@@ -93,10 +93,10 @@ dependencies:
93
93
  version: '0'
94
94
  type: :development
95
95
  prerelease: false
96
- version_requirements: *69377910
96
+ version_requirements: *74918610
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: guard-bundler
99
- requirement: &69377680 !ruby/object:Gem::Requirement
99
+ requirement: &74918400 !ruby/object:Gem::Requirement
100
100
  none: false
101
101
  requirements:
102
102
  - - ! '>='
@@ -104,10 +104,10 @@ dependencies:
104
104
  version: '0'
105
105
  type: :development
106
106
  prerelease: false
107
- version_requirements: *69377680
107
+ version_requirements: *74918400
108
108
  - !ruby/object:Gem::Dependency
109
109
  name: ruby-debug19
110
- requirement: &69377310 !ruby/object:Gem::Requirement
110
+ requirement: &74918190 !ruby/object:Gem::Requirement
111
111
  none: false
112
112
  requirements:
113
113
  - - ! '>='
@@ -115,7 +115,7 @@ dependencies:
115
115
  version: '0'
116
116
  type: :development
117
117
  prerelease: false
118
- version_requirements: *69377310
118
+ version_requirements: *74918190
119
119
  description: rbraspag gem to use Braspag gateway
120
120
  email:
121
121
  - tinorj@gmail.com
@@ -143,6 +143,7 @@ files:
143
143
  - lib/rbraspag/crypto/webservice.rb
144
144
  - lib/rbraspag/eft.rb
145
145
  - lib/rbraspag/errors.rb
146
+ - lib/rbraspag/payment_method.rb
146
147
  - lib/rbraspag/utils.rb
147
148
  - lib/rbraspag/version.rb
148
149
  - rbraspag.gemspec
@@ -153,6 +154,7 @@ files:
153
154
  - spec/crypto/webservice_spec.rb
154
155
  - spec/eft_spec.rb
155
156
  - spec/spec_helper.rb
157
+ - spec/utils_spec.rb
156
158
  has_rdoc: true
157
159
  homepage: http://github.com/concretesolutions/rbraspag
158
160
  licenses: []