braspag-pagador 0.9.5 → 0.9.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/coverage/.resultset.json +1 -1
- data/coverage/index.html +4 -4
- data/lib/braspag-pagador/core/connection.rb +0 -2
- data/lib/braspag-pagador/core/customer.rb +2 -2
- data/lib/braspag-pagador/payment/credit_card.rb +6 -1
- data/lib/braspag-pagador/payment/recurrency_credit_card.rb +4 -0
- data/lib/braspag-pagador/version.rb +1 -1
- data/spec/core/order_spec.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40c19d878ac6ea45af6118e4f9e6c42a6df6dc22
|
4
|
+
data.tar.gz: 241c79d0788c88fb85fe606ede2213395e714859
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b680998c1e74233247828bc5abbe6a51336ac34ae4e85c524ed71b914b562e1ab1c3d840aa6c179bd54a8cd0f4189ec16c95aa4564d4b5d81ae20fc85a51357
|
7
|
+
data.tar.gz: e29baa46f5748299f67c1ea3065de163cb83e5d9c445828394cbf323f8726f49653675926225f5956479aec8a6de93c9aafb504297fd4fba684fb3645e06d1db
|
data/coverage/.resultset.json
CHANGED
data/coverage/index.html
CHANGED
@@ -23,7 +23,7 @@
|
|
23
23
|
<img src="./assets/0.5.3/loading.gif" alt="loading"/>
|
24
24
|
</div>
|
25
25
|
<div id="wrapper" style="display:none;">
|
26
|
-
<div class="timestamp">Generated <abbr class="timeago" title="2013-06-05T18:
|
26
|
+
<div class="timestamp">Generated <abbr class="timeago" title="2013-06-05T18:11:54-03:00">2013-06-05T18:11:54-03:00</abbr></div>
|
27
27
|
<ul class="group_tabs"></ul>
|
28
28
|
|
29
29
|
<div id="content">
|
@@ -9240,19 +9240,19 @@
|
|
9240
9240
|
<li class="never" data-hits="" data-linenumber="168">
|
9241
9241
|
|
9242
9242
|
|
9243
|
-
<code class="ruby"> :cancelled_at => Time.parse('2011-08-07 13:19:38
|
9243
|
+
<code class="ruby"> :cancelled_at => Time.parse('2011-08-07 13:19:38'),</code>
|
9244
9244
|
</li>
|
9245
9245
|
|
9246
9246
|
<li class="never" data-hits="" data-linenumber="169">
|
9247
9247
|
|
9248
9248
|
|
9249
|
-
<code class="ruby"> :paid_at => Time.parse('2011-08-07 13:19:38
|
9249
|
+
<code class="ruby"> :paid_at => Time.parse('2011-08-07 13:19:38'),</code>
|
9250
9250
|
</li>
|
9251
9251
|
|
9252
9252
|
<li class="never" data-hits="" data-linenumber="170">
|
9253
9253
|
|
9254
9254
|
|
9255
|
-
<code class="ruby"> :order_date => Time.parse('2011-08-07 13:06:06
|
9255
|
+
<code class="ruby"> :order_date => Time.parse('2011-08-07 13:06:06'),</code>
|
9256
9256
|
</li>
|
9257
9257
|
|
9258
9258
|
<li class="never" data-hits="" data-linenumber="171">
|
@@ -3,8 +3,8 @@ module BraspagPagador
|
|
3
3
|
include ::ActiveAttr::Model
|
4
4
|
|
5
5
|
attr_accessor :name, :document, :email
|
6
|
-
|
7
|
-
[:purchase, :generate, :authorize, :
|
6
|
+
|
7
|
+
[:purchase, :generate, :authorize, :save_credit_card, :recurrency ].each do |check_on|
|
8
8
|
validates :name, :length => {:minimum => 1, :maximum => 100, :on => check_on }
|
9
9
|
validates :email, :length => {:minimum => 1, :maximum => 255, :on => check_on, :allow_blank => true}
|
10
10
|
validates :document, :length => {:minimum => 11, :maximum => 18, :on => check_on, :allow_blank => true}
|
@@ -65,7 +65,7 @@ module BraspagPagador
|
|
65
65
|
end
|
66
66
|
|
67
67
|
|
68
|
-
[:purchase, :authorize, :
|
68
|
+
[:purchase, :authorize, :save_credit_card].each do |check_on|
|
69
69
|
validates :holder_name, :length => {:minimum => 1, :maximum => 100, :on => check_on}
|
70
70
|
|
71
71
|
validates :number, :presence => { :on => check_on }
|
@@ -97,6 +97,11 @@ module BraspagPagador
|
|
97
97
|
}
|
98
98
|
end
|
99
99
|
|
100
|
+
def self.from_save_credit_card(connection,credit_card, customer, request_id, params)
|
101
|
+
params = params.body
|
102
|
+
params[:save_credit_card_response][:save_credit_card_result]
|
103
|
+
end
|
104
|
+
|
100
105
|
def self.to_authorize(connection, order, credit_card)
|
101
106
|
year_normalize = credit_card.year.to_s[-2, 2]
|
102
107
|
{
|
@@ -2,7 +2,11 @@ module BraspagPagador
|
|
2
2
|
class Connection
|
3
3
|
def save_credit_card(credit_card, customer, request_id)
|
4
4
|
response = self.soap_request(:save_credit_card, credit_card, customer, request_id)
|
5
|
+
status = response[:success]
|
6
|
+
|
7
|
+
ActiveMerchant::Billing::Response.new(status,nil,response,:test => homologation?)
|
5
8
|
end
|
9
|
+
|
6
10
|
# request the credit card info in Braspag PCI Compliant
|
7
11
|
def get_recurrency(credit_card)
|
8
12
|
|
data/spec/core/order_spec.rb
CHANGED
@@ -165,9 +165,9 @@ describe BraspagPagador::Order do
|
|
165
165
|
:installments => "1",
|
166
166
|
:status => "3",
|
167
167
|
:amount => "0.01",
|
168
|
-
:cancelled_at => Time.parse('2011-08-07 13:19:38
|
169
|
-
:paid_at => Time.parse('2011-08-07 13:19:38
|
170
|
-
:order_date => Time.parse('2011-08-07 13:06:06
|
168
|
+
:cancelled_at => Time.parse('2011-08-07 13:19:38'),
|
169
|
+
:paid_at => Time.parse('2011-08-07 13:19:38'),
|
170
|
+
:order_date => Time.parse('2011-08-07 13:06:06'),
|
171
171
|
:transaction_id => "398591",
|
172
172
|
:tid => "5a1d4463-1d11-4571-a877-763aba0ef7ff"
|
173
173
|
})
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: braspag-pagador
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- CodeMiner42
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2013-06-
|
14
|
+
date: 2013-06-24 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activemerchant
|