solidus_mp 0.3.7 → 1.0.0
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: 317ace149d7d821b01bf295b4883a8b51966a77b9bd58f39607abeff96c6602a
|
4
|
+
data.tar.gz: d9f670db89f5bd072dab697a37cb3b15446966b93dd71762bffd5c4c35fb76ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f9d7f20d1db7a1e432aa91cfe54328d9f8a8f0aa01ba907fa9cd92b0dcd0bbe493a9944d1cdefa9b910b660f29a680c8ef758032deaa1048da0acd580ea9d1f
|
7
|
+
data.tar.gz: 808b7b32bd0f4776180af0f6bcd1124a14879b39947d73dfd493ceb796066a6351b59874ceac72abd0a39d7a62b26082053ff5e90bb2a0670c9700157cc7ad8d
|
@@ -13,13 +13,18 @@ module SolidusMp
|
|
13
13
|
"MpCard"
|
14
14
|
end
|
15
15
|
|
16
|
+
# Pra nao dar problema de pagamento pendente
|
17
|
+
def auto_capture?
|
18
|
+
true
|
19
|
+
end
|
20
|
+
|
16
21
|
def supports?(source)
|
17
22
|
source.is_a?(payment_source_class)
|
18
23
|
end
|
19
24
|
|
20
25
|
def create_card_payment payment
|
21
26
|
mp_payment = create_mp_payment(payment)
|
22
|
-
payment.source.update(external_id: mp_payment.id, three_ds_url: mp_payment.three_ds_info_external_resource_url, three_ds_creq: mp_payment.three_ds_info_creq)
|
27
|
+
payment.source.update(external_id: mp_payment.id, three_ds_url: mp_payment.three_ds_info_external_resource_url, three_ds_creq: mp_payment.three_ds_info_creq, last_four_digits: mp_payment.last_four_digits)
|
23
28
|
if mp_payment.error || mp_payment.internal_error
|
24
29
|
payment.invalidate
|
25
30
|
error_message = "#{mp_payment.error || mp_payment.internal_error} (#{mp_payment.status_detail})"
|
@@ -27,7 +32,6 @@ module SolidusMp
|
|
27
32
|
payment.log_entries.create!(parsed_payment_response_details_with_fallback: response)
|
28
33
|
payment.source.update(error_message: mp_payment.error || "Ocorreu um erro ao criar o pagamento.", status: "error")
|
29
34
|
elsif mp_payment.status == "approved"
|
30
|
-
payment.complete
|
31
35
|
payment.source.update(status: "success")
|
32
36
|
elsif mp_payment.status == "pending"
|
33
37
|
payment.source.update(status: "pending")
|
@@ -85,4 +89,4 @@ module SolidusMp
|
|
85
89
|
end
|
86
90
|
|
87
91
|
end
|
88
|
-
end
|
92
|
+
end
|
data/lib/solidus_mp/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus_mp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- caio
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: solidus_core
|
@@ -115,6 +115,7 @@ files:
|
|
115
115
|
- db/migrate/20231221141935_add_items_to_mp_card.rb
|
116
116
|
- db/migrate/20240105143500_add_status_to_payment_source.rb
|
117
117
|
- db/migrate/20240109171955_add_error_message_to_payment_source.rb
|
118
|
+
- db/migrate/20240510185743_add_last_four_digits_to_credit_card_source.rb
|
118
119
|
- lib/generators/solidus_mp/install/install_generator.rb
|
119
120
|
- lib/generators/solidus_mp/install/templates/app/javascript/controllers/credit_card_controller.js
|
120
121
|
- lib/generators/solidus_mp/install/templates/app/javascript/controllers/three_ds_controller.js
|
@@ -157,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
157
158
|
- !ruby/object:Gem::Version
|
158
159
|
version: '0'
|
159
160
|
requirements: []
|
160
|
-
rubygems_version: 3.5.
|
161
|
+
rubygems_version: 3.5.10
|
161
162
|
signing_key:
|
162
163
|
specification_version: 4
|
163
164
|
summary: ''
|