pagseguro-transparente 0.2.4 → 0.2.5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a50b1dd31388941a32fe40d5f990c4281703f2b5
|
4
|
+
data.tar.gz: ddaa6c56d53c186d85529c6cfdfe3b85fa80d957
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1b5c0d2ffc880225d3a3736c495c025eaac0495195f537eabcaa95f7c44ac29121b5953c2be686ff9ff39405aab9786a74d92d394ab60a89d555244d1576adc
|
7
|
+
data.tar.gz: 088efb80c704e47314ad085b886bc963d95629e8466aefaa8b1a7f1eb4a0c7e93a8e64c07896bd1e275556629578d7f1af5ac710a8514066c954215198c8491e
|
data/lib/pagseguro/payment.rb
CHANGED
@@ -49,9 +49,9 @@ module PagSeguro
|
|
49
49
|
|
50
50
|
attr_accessor :extra_amount
|
51
51
|
|
52
|
-
# Set the max
|
52
|
+
# Set the max installment with no interest.
|
53
53
|
# Optional.
|
54
|
-
attr_accessor :
|
54
|
+
attr_accessor :max_installment_no_interest
|
55
55
|
|
56
56
|
# Products/items in this payment request.
|
57
57
|
def items
|
@@ -16,12 +16,7 @@ module PagSeguro
|
|
16
16
|
params[:paymentMode] = payment.payment_mode
|
17
17
|
params[:reference] = payment.reference
|
18
18
|
params[:extraAmount] = payment.extra_amount
|
19
|
-
|
20
|
-
if payment.max_installments_no_interest
|
21
|
-
params[:paymentMethodGroup1] ='CREDIT_CARD'
|
22
|
-
params[:paymentMethodConfigKey1_1] ='MAX_INSTALLMENTS_NO_INTEREST'
|
23
|
-
params[:paymentMethodConfigValue1_1] = payment.max_installments_no_interest
|
24
|
-
end
|
19
|
+
params[:noInterestInstallmentQuantity] = payment.max_installment_no_interest
|
25
20
|
|
26
21
|
payment.items.each.with_index(1) do |item, index|
|
27
22
|
serialize_item(item, index)
|
data/lib/pagseguro/version.rb
CHANGED
@@ -19,7 +19,7 @@ describe PagSeguro::Payment::Serializer do
|
|
19
19
|
payment.shipping = shipping
|
20
20
|
payment.credit_card = credit_card
|
21
21
|
payment.bank = bank
|
22
|
-
payment.
|
22
|
+
payment.max_installment_no_interest = 6
|
23
23
|
payment.items = [PagSeguro::Item.new(id: '0001', description: 'Notebook Prata', amount: '24300.00', quantity: '1') ,
|
24
24
|
PagSeguro::Item.new(id: '0002', description: 'Notebook Rosa', amount: '25600.00', quantity: '2') ]
|
25
25
|
payment
|
@@ -130,9 +130,7 @@ describe PagSeguro::Payment::Serializer do
|
|
130
130
|
it { subject[:itemAmount2].should eq('25600.00') }
|
131
131
|
it { subject[:itemQuantity2].should eq('2') }
|
132
132
|
|
133
|
-
it { subject[:
|
134
|
-
it { subject[:paymentMethodConfigKey1_1].should eq('MAX_INSTALLMENTS_NO_INTEREST') }
|
135
|
-
it { subject[:paymentMethodConfigValue1_1].should eq(6) }
|
133
|
+
it { subject[:noInterestInstallmentQuantity].should eq(6) }
|
136
134
|
|
137
135
|
context 'with bithdate null' do
|
138
136
|
let(:holder) do
|
@@ -65,7 +65,7 @@ describe PagSeguro::Payment do
|
|
65
65
|
it { should respond_to(:shipping) }
|
66
66
|
it { should respond_to(:bank) }
|
67
67
|
it { should respond_to(:credit_card) }
|
68
|
-
it { should respond_to(:
|
68
|
+
it { should respond_to(:max_installment_no_interest) }
|
69
69
|
|
70
70
|
describe 'presence validations' do
|
71
71
|
it { should validate_presence_of(:currency) }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pagseguro-transparente
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cirdes Henrique
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-01-
|
12
|
+
date: 2015-01-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activemodel
|
@@ -277,7 +277,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
277
277
|
version: '0'
|
278
278
|
requirements: []
|
279
279
|
rubyforge_project:
|
280
|
-
rubygems_version: 2.
|
280
|
+
rubygems_version: 2.2.2
|
281
281
|
signing_key:
|
282
282
|
specification_version: 4
|
283
283
|
summary: Integração com o novo checkout transparente do Pagseguro.
|