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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f06155846ca19f7ce7df707c5977f92b032cb775
4
- data.tar.gz: 492b3624ff1e90a2e50965342ddf16c536e654de
3
+ metadata.gz: 40c19d878ac6ea45af6118e4f9e6c42a6df6dc22
4
+ data.tar.gz: 241c79d0788c88fb85fe606ede2213395e714859
5
5
  SHA512:
6
- metadata.gz: 6fe8a71ef53a3252a5df433cae723819bb5f96f9009463df4e0fc7366569525dc4386f0ad54e5865635f749e03b2664427e44c7d8e3bec9b6efd4fea4bf55010
7
- data.tar.gz: 852c5a60371a6b7c9c69eb69524425a9d3114e2477fe176de7e12c284b152b121ed3657def7e358f2d6f3023fcd829461bf966e9fa2f6f6239ade3cae78ad807
6
+ metadata.gz: 2b680998c1e74233247828bc5abbe6a51336ac34ae4e85c524ed71b914b562e1ab1c3d840aa6c179bd54a8cd0f4189ec16c95aa4564d4b5d81ae20fc85a51357
7
+ data.tar.gz: e29baa46f5748299f67c1ea3065de163cb83e5d9c445828394cbf323f8726f49653675926225f5956479aec8a6de93c9aafb504297fd4fba684fb3645e06d1db
@@ -2770,6 +2770,6 @@
2770
2770
  null
2771
2771
  ]
2772
2772
  },
2773
- "timestamp": 1370466331
2773
+ "timestamp": 1370466714
2774
2774
  }
2775
2775
  }
@@ -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:05:31-03:00">2013-06-05T18:05:31-03:00</abbr></div>
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 =&gt; Time.parse(&#39;2011-08-07 13:19:38 -0300&#39;),</code>
9243
+ <code class="ruby"> :cancelled_at =&gt; Time.parse(&#39;2011-08-07 13:19:38&#39;),</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 =&gt; Time.parse(&#39;2011-08-07 13:19:38 -0300&#39;),</code>
9249
+ <code class="ruby"> :paid_at =&gt; Time.parse(&#39;2011-08-07 13:19:38&#39;),</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 =&gt; Time.parse(&#39;2011-08-07 13:06:06 -0300&#39;),</code>
9255
+ <code class="ruby"> :order_date =&gt; Time.parse(&#39;2011-08-07 13:06:06&#39;),</code>
9256
9256
  </li>
9257
9257
 
9258
9258
  <li class="never" data-hits="" data-linenumber="171">
@@ -87,8 +87,6 @@ module BraspagPagador
87
87
  url = url_for(method_name)
88
88
  client = Savon.client(wsdl: url)
89
89
 
90
- binding.pry
91
-
92
90
  response = client.call method_name, message: self.convert(method_name, :to, args)
93
91
 
94
92
  self.convert(method_name, :from, args + [response] )
@@ -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, :archive, :recurrency ].each do |check_on|
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, :archive].each do |check_on|
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
 
@@ -1,3 +1,3 @@
1
1
  module BraspagPagador
2
- VERSION = "0.9.5"
2
+ VERSION = "0.9.6"
3
3
  end
@@ -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 -0300'),
169
- :paid_at => Time.parse('2011-08-07 13:19:38 -0300'),
170
- :order_date => Time.parse('2011-08-07 13:06:06 -0300'),
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.5
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-05 00:00:00.000000000 Z
14
+ date: 2013-06-24 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activemerchant