pagseguro-transparente 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/pagseguro/transaction.rb +5 -1
- data/lib/pagseguro/version.rb +1 -1
- data/spec/pagseguro/transaction_spec.rb +10 -0
- 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: 50c23ec1585127452ab5ef5825ab28c1f49d7890
|
4
|
+
data.tar.gz: 06b91010e1abc25b4134b3e8525abfa3dc63af30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19c26ce1724c42fe0021c6719a4b8efe1c33783e878ec3c91649398b8a68fb7648f481ab69d260ddee439b8d5cf5832cd63dff3d23d116b1e76e7521e2b84594
|
7
|
+
data.tar.gz: 7f135a9e059b7c3d754a083f0d8e95df1657c2f7076dadcbc5a50ef620469f5479258820065d65bada411228055143743bf2b70dbacb39a488253b20153ae72d
|
data/Gemfile.lock
CHANGED
@@ -4,7 +4,7 @@ module PagSeguro
|
|
4
4
|
attr_reader :response
|
5
5
|
|
6
6
|
def_delegators :creditor_fees, :installment_fee_amount,
|
7
|
-
:intermediation_rate_amount, :intermediation_fee_amount
|
7
|
+
:intermediation_rate_amount, :intermediation_fee_amount
|
8
8
|
|
9
9
|
PAYMENT_STATUS = { '1' => :awaiting_payment, '2' => :pending, '3' => :paid,
|
10
10
|
'4' => :available, '5' => :in_dispute, '6' => :refunded, '7' => :canceled,
|
@@ -100,6 +100,10 @@ module PagSeguro
|
|
100
100
|
[response['errors']['error']].flatten
|
101
101
|
end
|
102
102
|
|
103
|
+
def fee_amount
|
104
|
+
transaction['feeAmount'] || creditor_fees.fee_amount
|
105
|
+
end
|
106
|
+
|
103
107
|
private
|
104
108
|
def transaction
|
105
109
|
@transaction ||= response['transaction']
|
data/lib/pagseguro/version.rb
CHANGED
@@ -78,6 +78,16 @@ describe PagSeguro::Transaction do
|
|
78
78
|
its(:errors) { should eq( [ { "code" => "53044", "message" => "credit card holder name invalid value: Flora"} ]) }
|
79
79
|
end
|
80
80
|
|
81
|
+
context 'with fee_amount' do
|
82
|
+
let(:xml_file) {
|
83
|
+
"<transaction>
|
84
|
+
<feeAmount>49.50</feeAmount>
|
85
|
+
</transaction>"
|
86
|
+
}
|
87
|
+
|
88
|
+
its(:fee_amount) { should eq("49.50") }
|
89
|
+
end
|
90
|
+
|
81
91
|
context "various errors" do
|
82
92
|
let(:xml_file) {
|
83
93
|
"<errors>
|
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: 1.0.
|
4
|
+
version: 1.0.1
|
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-03-
|
12
|
+
date: 2015-03-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activemodel
|