solidus_mp 0.3.5 → 0.3.6

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: cef0f755b4ab80066b91807e811ed579ea52bb59745616a478bef4d20814fcfb
4
- data.tar.gz: 826957755087e298309cc41aaef64b9d3bb7085804feb08d1cd67ecab2e65a69
3
+ metadata.gz: 72e067802a3b96e6830c7b63fac81cdd014e0c8febd255d7e4d8006a0c84a46d
4
+ data.tar.gz: 7898b7afccd566b511bff013c0765d7dada4f7fa9117cdd67ed9e0774e240626
5
5
  SHA512:
6
- metadata.gz: e6e79043acd0699682e1feba07d2d39a5fbcf22259b9acacf54698eb26efa89163fce7f1a531090adea6eb64ff4bcc05db388443e7f66d51beda9757ccd2425e
7
- data.tar.gz: d2f58ca88360e1b9d74003c826d7808e0cabb16eaa550377d76d473370ba7c15df4776a9ce9edd8dad36ebb7a6952deb5168042e67e54d6ccfa347dba9618989
6
+ metadata.gz: 3324347d77daa6788a3a74653838358d015ab86de8d507b04639dcf3fc2bb5144ef747e15dfb18f9db7291fbfd664ed31536a0a12f4822cdcc51f2c446f8bcef
7
+ data.tar.gz: 59818424ddc907b7a44518766708bfe51f6f8307287c157fecd09ff533e166f6637ea9f53548aec62385e9cb74ab0864eaf2a4e8b3bf4bf1ceff07452100c955
data/Rakefile CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "bundler/gem_tasks"
4
- require 'solidus_dev_support/rake_tasks'
5
- SolidusDevSupport::RakeTasks.install
4
+ # require 'solidus_dev_support/rake_tasks'
5
+ # SolidusDevSupport::RakeTasks.install
6
6
 
7
7
  task default: 'extension:specs'
@@ -17,6 +17,10 @@ module SolidusMp
17
17
  source.is_a?(payment_source_class)
18
18
  end
19
19
 
20
+ def auto_capture?
21
+ true
22
+ end
23
+
20
24
  def create_pix_payment payment
21
25
  mp_payment = create_mp_payment(payment)
22
26
  if mp_payment.error || mp_payment.internal_error
@@ -56,6 +60,16 @@ module SolidusMp
56
60
  end
57
61
  end
58
62
 
63
+ def should_skip_processing?(source)
64
+ MpApi.configuration.access_token = preferences[:access_token]
65
+ mp_payment = MpApi::Payment.find_by_id(source.external_id)
66
+ if mp_payment.status == "approved"
67
+ false
68
+ else
69
+ true
70
+ end
71
+ end
72
+
59
73
  def partial_name
60
74
  'mercado_pago_pix'
61
75
  end
@@ -77,4 +91,4 @@ module SolidusMp
77
91
  end
78
92
 
79
93
  end
80
- end
94
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SolidusMp
4
- VERSION = '0.3.5'
4
+ VERSION = '0.3.6'
5
5
  end
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.3.5
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - caio
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-01-24 00:00:00.000000000 Z
11
+ date: 2024-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: solidus_core
@@ -157,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
157
157
  - !ruby/object:Gem::Version
158
158
  version: '0'
159
159
  requirements: []
160
- rubygems_version: 3.4.19
160
+ rubygems_version: 3.4.6
161
161
  signing_key:
162
162
  specification_version: 4
163
163
  summary: ''