nitro_pay 1.0.2 → 1.0.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2c494f9baa9334b80eabe61684c900a8e958ff52
4
- data.tar.gz: 184577c69d7bd3d2079665ec42f9105e4ff577e9
3
+ metadata.gz: 65b38eeaeedb06882c1ae690696ce7ed46cd9dbe
4
+ data.tar.gz: 41784edf7a19eb093a98a93bab4ba19bf70ebf20
5
5
  SHA512:
6
- metadata.gz: e84941899a12273b0be3a84d02abe68dfde5513d6127a902f489931e053c321633f9ba33087e5e648da1d908235f8792e9b83c6261bcd67679d16d7c3c132798
7
- data.tar.gz: 2c94bbd295fd676bd99504a13d43d55a2d3f26772465c816a7d02f6d17757e267a54ff50c4ff5825fdb2bacf18009e4210d6b30ef9c640bc4f5320ac368ba39d
6
+ metadata.gz: 728e5f749e32a46f26b7c44efbdfec85032b823079741f30e88726c13cc281ccc9109c10a01b41beccf00979a038427d41f7f7b6e1fba0017a32231b7e08b650
7
+ data.tar.gz: 5e1e7690d7ee91a8c837d36df07c1baede8e4c089c29df4d730fa28cbc307e0210410c4ac29d21dbd6967c73b9a72ae6017c69907f66fb36afb3c476fa38170a
@@ -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
 
@@ -1,6 +1,6 @@
1
1
  module NitroPay
2
2
  MAJOR = 1
3
3
  MINOR = 0
4
- PATCH = 2
4
+ PATCH = 3
5
5
  VERSION = "#{MAJOR}.#{MINOR}.#{PATCH}"
6
6
  end
@@ -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.2
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-10 00:00:00.000000000 Z
11
+ date: 2016-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler