solidus_mp_dois 0.0.7 → 0.0.9
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ebef0dcf722dda6977b818295e2e6c75800a331541350ce6c429a0ed8cdff39
|
4
|
+
data.tar.gz: 00c49dc7f47be4986e9d434b728a6a39573e9469b3bd1d4d1ca8dc1de21b4648
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1189962e09a95c85ab5b710c4a1006ccdf14cdc445d187dde3d77393d9a3f7d86fd1829de9cb43bf2aa40c00018a7e17fc62b30b847e021247fe2a164b38d063
|
7
|
+
data.tar.gz: 47611302eb6cbbd2a3c4c607caf6ca716eb2250fda0d8cf724f393e88afd08f456598ae35c8416c8d7a4aa83a878c6d38448f8475f628700ef33db5ea20df8ea
|
@@ -23,6 +23,8 @@ module SolidusMpDois
|
|
23
23
|
successful_response("Pagamento cancelado. Se necessário, realize o reembolso.", transaction_id)
|
24
24
|
end
|
25
25
|
|
26
|
+
private
|
27
|
+
|
26
28
|
def successful_response message, transaction_id
|
27
29
|
ActiveMerchant::Billing::Response.new(
|
28
30
|
true,
|
@@ -31,5 +33,12 @@ module SolidusMpDois
|
|
31
33
|
authorization: transaction_id
|
32
34
|
)
|
33
35
|
end
|
36
|
+
|
37
|
+
def failure_response message
|
38
|
+
ActiveMerchant::Billing::Response.new(
|
39
|
+
false,
|
40
|
+
message
|
41
|
+
)
|
42
|
+
end
|
34
43
|
end
|
35
44
|
end
|
@@ -30,8 +30,8 @@ module SolidusMpDois
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def create_payment order
|
33
|
-
|
34
|
-
return
|
33
|
+
existing_payment = find_existing_payment(order)
|
34
|
+
return existing_payment if payment_usable?(order, existing_payment)
|
35
35
|
|
36
36
|
payment = order.payments.new(amount: order.total, payment_method: self)
|
37
37
|
payment.source = init_source(order)
|
@@ -1,2 +1,5 @@
|
|
1
|
-
|
2
|
-
:last_four_digits)
|
1
|
+
if payment_source.respond_to?(:card_brand)
|
2
|
+
json.call(payment_source, :id, :external_id, :tax_id, :email, :status, :card_brand, :installments, :last_four_digits)
|
3
|
+
else
|
4
|
+
json.call(payment_source, :id, :external_id, :tax_id, :email, :status, :credit_card_brand, :installments, :last_four_digits)
|
5
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus_mp_dois
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Todas Essas Coisas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-12-
|
11
|
+
date: 2024-12-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: solidus_brazilian_adaptations
|