nitro_pay 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/nitro_pay/connection.rb +2 -2
- data/lib/nitro_pay/transaction.rb +1 -1
- data/lib/nitro_pay/version.rb +1 -1
- data/spec/nitro_pay/transaction_spec.rb +0 -7
- 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: 65b38eeaeedb06882c1ae690696ce7ed46cd9dbe
|
4
|
+
data.tar.gz: 41784edf7a19eb093a98a93bab4ba19bf70ebf20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 728e5f749e32a46f26b7c44efbdfec85032b823079741f30e88726c13cc281ccc9109c10a01b41beccf00979a038427d41f7f7b6e1fba0017a32231b7e08b650
|
7
|
+
data.tar.gz: 5e1e7690d7ee91a8c837d36df07c1baede8e4c089c29df4d730fa28cbc307e0210410c4ac29d21dbd6967c73b9a72ae6017c69907f66fb36afb3c476fa38170a
|
data/lib/nitro_pay/connection.rb
CHANGED
@@ -132,8 +132,8 @@ module NitroPay
|
|
132
132
|
end
|
133
133
|
|
134
134
|
# HTTP requests must have '[]' on it key name to send Array
|
135
|
-
def custom_http_params
|
136
|
-
setup_format_and_validators
|
135
|
+
def custom_http_params(skip_formatters=false)
|
136
|
+
setup_format_and_validators unless skip_formatters
|
137
137
|
|
138
138
|
return if self.sold_items.nil?
|
139
139
|
self.sold_items.each_with_index do |sold_item, i|
|
@@ -33,7 +33,7 @@ module NitroPay
|
|
33
33
|
|
34
34
|
# POST /api/transactions/page return operator page URL, like the Cielo Page
|
35
35
|
def charge_page(full_resp=false)
|
36
|
-
custom_http_params
|
36
|
+
custom_http_params(skip_formatters=true)
|
37
37
|
# SetUp redirect dynamic if is test
|
38
38
|
self.request_params[:transaction][:redirect_link] = "#{self.redirect_link}" if self.request_params[:transaction][:test_env]
|
39
39
|
|
data/lib/nitro_pay/version.rb
CHANGED
@@ -601,7 +601,6 @@ describe NitroPay::Transaction do
|
|
601
601
|
|
602
602
|
@checkout_page_params = {
|
603
603
|
title: 'Alfred Robots',
|
604
|
-
amount: Random.rand(99999).to_s,
|
605
604
|
redirect_link: @redirect_link,
|
606
605
|
brand: 'https://s3-sa-east-1.amazonaws.com/global-defaults/nitropay/alfred.png',
|
607
606
|
alert: 'Atenção! Você está comprando créditos válidos somente para aquisição de itens do projeto AlfredRobots.',
|
@@ -636,12 +635,6 @@ describe NitroPay::Transaction do
|
|
636
635
|
expect(@resp).to include(:tid)
|
637
636
|
expect(tid).to eq(@resp[:tid])
|
638
637
|
end
|
639
|
-
|
640
|
-
it 'resp amount must be equals the sent value' do
|
641
|
-
amount = @resp[:amount]
|
642
|
-
unformed_received_amount = @checkout_transaction.unformed_received_amount
|
643
|
-
expect(unformed_received_amount).to eq(@checkout_page_params[:amount])
|
644
|
-
end
|
645
638
|
end
|
646
639
|
end
|
647
640
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nitro_pay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ilton Garcia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|