braspag-pagador 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 7f34982edd35df3be39deba92ad5ea086c8be24c
4
+ data.tar.gz: c65ae937d0ad0c91b58e70c0ba0ac69100eec016
5
+ SHA512:
6
+ metadata.gz: f469bd32a4b95ebb458e667b4b0d029c9affbcbcb60ba0f829559b7ee9aed1386b25d6250a57891f16b3d0de78393cdb7d85f5816c61b34fda223843a6601b0f
7
+ data.tar.gz: e53946ce5b41a61c31561a89347aa23aaff1aa08dda9c90c37b31ee218bdc78973a475d80be61a5d7347afbef584ed275e39d52f8df81eb5fa8506ea81fffe22
data/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  (The MIT License)
2
2
 
3
- Copyright (c) 2012 - Codeminer42 contato(at)codeminer42.com
3
+ Copyright (c) 2012 - Raphael Costa raphael(at)raphaelcosta.net
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,12 +1,26 @@
1
-
2
-
3
1
  # braspag-pagador [![Build Status](https://travis-ci.org/raphaelcosta/braspag-pagador.png?branch=master)](https://travis-ci.org/raphaelcosta/braspag-pagador)
4
2
 
5
3
  braspag-pagador gem to use Braspag gateway
6
4
 
5
+ - Based on gem cbraspag from Codeminer42 and other forks
7
6
  - Support most operations in gateway
8
7
  - Compatible with Active Merchant response object
9
8
  - Support multiple connections easy
9
+ - Support just click key ( Save creditcard)
10
+
11
+ Many people contributed on this project to generate this release, thanks to all these people:
12
+
13
+ @gonow
14
+ @renatoelias
15
+ @drec18
16
+ @ricardoalmeida
17
+ @lenonmarcel
18
+ @tinogomes
19
+ @madsoncardo
20
+ @lucabastos
21
+ @cassiomarques
22
+ @codeminer42
23
+ @vinibaggio
10
24
 
11
25
  ## RUN INTEGRATION TEST
12
26
 
@@ -419,7 +433,7 @@ braspag-pagador gem to use Braspag gateway
419
433
 
420
434
  # Validating the card automatically detects the card type
421
435
  if credit_card.valid?(:archive) && customer.valid?(:archive)
422
- response = gateway.archive(credit_card, customer, "00000000-0000-0000-0000-000000000044")
436
+ response = gateway.save_credit_card(credit_card, customer, "00000000-0000-0000-0000-000000000044")
423
437
 
424
438
  if response.success?
425
439
  puts "Successfully saved credit_card! The just key #{credit_card.id}"
@@ -440,15 +454,9 @@ braspag-pagador gem to use Braspag gateway
440
454
  :environment => :homologation
441
455
  )
442
456
 
443
- # The card verification value is also known as CVV2, CVC2, or CID
444
- credit_card = BraspagPagador::CreditCard.new(
445
- :id => '123123123123123',
446
- :alias => 'Card Visa' #(OPTIONAL)
447
- )
448
457
 
449
- # Validating the card automatically detects the card type
450
- if credit_card.valid?(:get_recurrency)
451
- response = gateway.get_recurrency(credit_card)
458
+ just_click_key = '231231288as-asdassad23423asd-324234'
459
+ credit_card = gateway.get_credit_card(just_click_key)
452
460
 
453
461
  if response.success?
454
462
  puts "Successfully get credit!"
@@ -462,56 +470,13 @@ braspag-pagador gem to use Braspag gateway
462
470
  end
463
471
 
464
472
 
465
- ## CREDITCARD RECURRING PURCHASE
466
-
467
- Purchase order using recurrence
468
-
469
- require 'rubygems'
470
- require 'braspag-pagador'
471
-
472
- gateway = BraspagPagador::Connection.new(
473
- :merchant_id => '{84BE7E7F-698A-6C74-F820-AE359C2A07C2}',
474
- :environment => :homologation
475
- )
476
-
477
- # The card verification value is also known as CVV2, CVC2, or CID
478
- credit_card = BraspagPagador::CreditCard.new(
479
- :id => '123415',
480
- :verification_value => '123',
481
- :alias => 'Card Visa' #(OPTIONAL)
482
- )
483
-
484
- customer = BraspagPagador::Customer.new(
485
- :name => 'Bob Dela Bobsen'
486
- )
487
-
488
- order = BraspagPagador::Order.new(
489
- :payment_method => BraspagPagador::PAYMENT_METHOD[:redecard],
490
- :id => 11,
491
- :amount => 10.00, # $10.00 (accepts all amounts as Integer values in cents)
492
- :customer => customer,
493
- :installments => 1,
494
- :installments_type => BraspagPagador::INTEREST[:no]
495
- )
496
-
497
- # Validating the card automatically detects the card type
498
- if credit_card.valid?(:recurrency) && customer.valid?(:recurrency) && order.valid?(:recurrency)
499
- # Capture $10 from the credit card
500
- response = gateway.recurrency(order, credit_card, "00000000-0000-0000-0000-000000000044")
501
-
502
- if response.success?
503
- puts "Successfully charged $#{sprintf("%.2f", order.amount / 100)} to the credit card #{credit_card.id}"
504
- else
505
- raise StandardError, response.message
506
- end
507
- en
508
-
509
473
 
510
474
  # License
511
475
 
512
476
  (The MIT License)
513
477
 
514
- Copyright (c) 2012 - Codeminer42 contato(at)codeminer42.com
478
+ Copyright (c) 2013 - Raphael Costa raphael(at)raphaelcosta.net
479
+ Copyright (c) 2013 - Codeminer42 contato(at)codeminer42.com
515
480
 
516
481
  Permission is hereby granted, free of charge, to any person obtaining
517
482
  a copy of this software and associated documentation files (the
@@ -64,7 +64,7 @@ module BraspagPagador
64
64
  [:purchase, :generate, :authorize, :capture, :void, :recurrency].each do |check_on|
65
65
  validates :id, :presence => { :on => check_on }
66
66
  validates :id, :length => {:minimum => 1, :maximum => 20, :on => check_on }
67
- validates :id, :format => { :with => /^[0-9]+$/, :on => check_on, :if => :payment_for_cielo? }
67
+ validates :id, :format => { :with => /\A[0-9]+\z/, :on => check_on, :if => :payment_for_cielo? }
68
68
  end
69
69
 
70
70
  [:purchase, :generate, :authorize, :recurrency].each do |check_on|
@@ -1,3 +1,3 @@
1
1
  module BraspagPagador
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: braspag-pagador
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
5
- prerelease:
4
+ version: 1.0.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - CodeMiner42
@@ -12,92 +11,81 @@ authors:
12
11
  autorequire:
13
12
  bindir: bin
14
13
  cert_chain: []
15
- date: 2013-07-09 00:00:00.000000000 Z
14
+ date: 2014-02-11 00:00:00.000000000 Z
16
15
  dependencies:
17
16
  - !ruby/object:Gem::Dependency
18
17
  name: activemerchant
19
18
  requirement: !ruby/object:Gem::Requirement
20
- none: false
21
19
  requirements:
22
- - - ! '>='
20
+ - - '>='
23
21
  - !ruby/object:Gem::Version
24
22
  version: 1.28.0
25
23
  type: :runtime
26
24
  prerelease: false
27
25
  version_requirements: !ruby/object:Gem::Requirement
28
- none: false
29
26
  requirements:
30
- - - ! '>='
27
+ - - '>='
31
28
  - !ruby/object:Gem::Version
32
29
  version: 1.28.0
33
30
  - !ruby/object:Gem::Dependency
34
31
  name: active_attr
35
32
  requirement: !ruby/object:Gem::Requirement
36
- none: false
37
33
  requirements:
38
- - - ! '>='
34
+ - - '>='
39
35
  - !ruby/object:Gem::Version
40
36
  version: '0.6'
41
37
  type: :runtime
42
38
  prerelease: false
43
39
  version_requirements: !ruby/object:Gem::Requirement
44
- none: false
45
40
  requirements:
46
- - - ! '>='
41
+ - - '>='
47
42
  - !ruby/object:Gem::Version
48
43
  version: '0.6'
49
44
  - !ruby/object:Gem::Dependency
50
45
  name: httpi
51
46
  requirement: !ruby/object:Gem::Requirement
52
- none: false
53
47
  requirements:
54
- - - ! '>='
48
+ - - '>='
55
49
  - !ruby/object:Gem::Version
56
50
  version: 0.9.6
57
51
  type: :runtime
58
52
  prerelease: false
59
53
  version_requirements: !ruby/object:Gem::Requirement
60
- none: false
61
54
  requirements:
62
- - - ! '>='
55
+ - - '>='
63
56
  - !ruby/object:Gem::Version
64
57
  version: 0.9.6
65
58
  - !ruby/object:Gem::Dependency
66
59
  name: json
67
60
  requirement: !ruby/object:Gem::Requirement
68
- none: false
69
61
  requirements:
70
- - - ! '>='
62
+ - - '>='
71
63
  - !ruby/object:Gem::Version
72
64
  version: 1.6.1
73
65
  type: :runtime
74
66
  prerelease: false
75
67
  version_requirements: !ruby/object:Gem::Requirement
76
- none: false
77
68
  requirements:
78
- - - ! '>='
69
+ - - '>='
79
70
  - !ruby/object:Gem::Version
80
71
  version: 1.6.1
81
72
  - !ruby/object:Gem::Dependency
82
73
  name: nokogiri
83
74
  requirement: !ruby/object:Gem::Requirement
84
- none: false
85
75
  requirements:
86
- - - ! '>='
76
+ - - '>='
87
77
  - !ruby/object:Gem::Version
88
78
  version: 1.4.7
89
79
  type: :runtime
90
80
  prerelease: false
91
81
  version_requirements: !ruby/object:Gem::Requirement
92
- none: false
93
82
  requirements:
94
- - - ! '>='
83
+ - - '>='
95
84
  - !ruby/object:Gem::Version
96
85
  version: 1.4.7
97
86
  - !ruby/object:Gem::Dependency
98
87
  name: savon
99
88
  requirement: !ruby/object:Gem::Requirement
100
- none: false
101
89
  requirements:
102
90
  - - ~>
103
91
  - !ruby/object:Gem::Version
@@ -105,7 +93,6 @@ dependencies:
105
93
  type: :runtime
106
94
  prerelease: false
107
95
  version_requirements: !ruby/object:Gem::Requirement
108
- none: false
109
96
  requirements:
110
97
  - - ~>
111
98
  - !ruby/object:Gem::Version
@@ -113,68 +100,60 @@ dependencies:
113
100
  - !ruby/object:Gem::Dependency
114
101
  name: rake
115
102
  requirement: !ruby/object:Gem::Requirement
116
- none: false
117
103
  requirements:
118
- - - ! '>='
104
+ - - '>='
119
105
  - !ruby/object:Gem::Version
120
106
  version: '0'
121
107
  type: :development
122
108
  prerelease: false
123
109
  version_requirements: !ruby/object:Gem::Requirement
124
- none: false
125
110
  requirements:
126
- - - ! '>='
111
+ - - '>='
127
112
  - !ruby/object:Gem::Version
128
113
  version: '0'
129
114
  - !ruby/object:Gem::Dependency
130
115
  name: rspec
131
116
  requirement: !ruby/object:Gem::Requirement
132
- none: false
133
117
  requirements:
134
- - - ! '>='
118
+ - - '>='
135
119
  - !ruby/object:Gem::Version
136
120
  version: '0'
137
121
  type: :development
138
122
  prerelease: false
139
123
  version_requirements: !ruby/object:Gem::Requirement
140
- none: false
141
124
  requirements:
142
- - - ! '>='
125
+ - - '>='
143
126
  - !ruby/object:Gem::Version
144
127
  version: '0'
145
128
  - !ruby/object:Gem::Dependency
146
129
  name: simplecov
147
130
  requirement: !ruby/object:Gem::Requirement
148
- none: false
149
131
  requirements:
150
- - - ! '>='
132
+ - - '>='
151
133
  - !ruby/object:Gem::Version
152
134
  version: '0'
153
135
  type: :development
154
136
  prerelease: false
155
137
  version_requirements: !ruby/object:Gem::Requirement
156
- none: false
157
138
  requirements:
158
- - - ! '>='
139
+ - - '>='
159
140
  - !ruby/object:Gem::Version
160
141
  version: '0'
161
142
  - !ruby/object:Gem::Dependency
162
143
  name: pry
163
144
  requirement: !ruby/object:Gem::Requirement
164
- none: false
165
145
  requirements:
166
- - - ! '>='
146
+ - - '>='
167
147
  - !ruby/object:Gem::Version
168
148
  version: '0'
169
149
  type: :development
170
150
  prerelease: false
171
151
  version_requirements: !ruby/object:Gem::Requirement
172
- none: false
173
152
  requirements:
174
- - - ! '>='
153
+ - - '>='
175
154
  - !ruby/object:Gem::Version
176
155
  version: '0'
177
- description: ! 'Braspag: brazilian gateway, agnostic, support all features in braspag'
156
+ description: 'Braspag: brazilian gateway, agnostic, support all features in braspag'
178
157
  email:
179
158
  - contato@codeminer42.com
180
159
  - renato.elias@gmail.com
@@ -188,7 +167,6 @@ files:
188
167
  - Gemfile.lock
189
168
  - LICENSE.md
190
169
  - README.md
191
- - RELEASES.md
192
170
  - Rakefile
193
171
  - braspag-pagador.gemspec
194
172
  - coverage/.resultset.json
@@ -275,40 +253,25 @@ files:
275
253
  - spec/spec_helper.rb
276
254
  homepage: http://github.com/raphaelcosta/braspag-pagador
277
255
  licenses: []
256
+ metadata: {}
278
257
  post_install_message:
279
258
  rdoc_options: []
280
259
  require_paths:
281
260
  - lib
282
261
  required_ruby_version: !ruby/object:Gem::Requirement
283
- none: false
284
262
  requirements:
285
- - - ! '>='
263
+ - - '>='
286
264
  - !ruby/object:Gem::Version
287
265
  version: '0'
288
266
  required_rubygems_version: !ruby/object:Gem::Requirement
289
- none: false
290
267
  requirements:
291
- - - ! '>='
268
+ - - '>='
292
269
  - !ruby/object:Gem::Version
293
270
  version: '0'
294
271
  requirements: []
295
272
  rubyforge_project: nowarning
296
- rubygems_version: 1.8.25
273
+ rubygems_version: 2.0.3
297
274
  signing_key:
298
- specification_version: 3
299
- summary: ! 'Braspag: brazilian gateway, agnostic, support all features in braspag'
300
- test_files:
301
- - spec/core/connection_spec.rb
302
- - spec/core/converter_spec.rb
303
- - spec/core/customer_spec.rb
304
- - spec/core/order_spec.rb
305
- - spec/core/poster_spec.rb
306
- - spec/crypto/webservice_spec.rb
307
- - spec/integration/billet_spec.rb
308
- - spec/integration/credit_card_spec.rb
309
- - spec/payment/billet_spec.rb
310
- - spec/payment/credit_card_spec.rb
311
- - spec/payment/eft_spec.rb
312
- - spec/payment/recurrency_credit_card_spec.rb
313
- - spec/spec_helper.rb
314
- has_rdoc:
275
+ specification_version: 4
276
+ summary: 'Braspag: brazilian gateway, agnostic, support all features in braspag'
277
+ test_files: []
@@ -1,20 +0,0 @@
1
- # RELEASES
2
-
3
- ## For next release
4
-
5
- d2b9a7a Voltando a usar o HTTPI
6
-
7
- ## 0.1.1 - 09/01/2012
8
-
9
- 9ffbcbd adicionando novos códigos de métodos de pagamento
10
-
11
-
12
- ## 0.1.0 - 09/01/2012
13
-
14
- 5cf697e adicionando Gemfile.lock ao .gitignore
15
- a6b1f54 removendo Gemfile.lock; modificando verificação do argumento has_interest
16
- a663e0a baixando a versão mínima requerida do nokogiri
17
- 628d108 refatorando testes e implementação
18
- 087549a moving Connection exceptions to errors.rb; tests for Utils class
19
- 9a727eb bump up version
20
- 6e5b1c3 refatorando para suportar o ambiente de produção da Braspag