solidus_inter 0.0.2 → 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: 0e914a20c06aee6978f5e168cdcec9fab0e45e8d82c7c25c35c6826f40fe0bbd
4
- data.tar.gz: f4b4c1c9e6e3aaa1809659e44f5a8d9b16958a01983ab0b67efe97bec414c086
3
+ metadata.gz: 7e4f2ec4ad7b0a257eaeb36a071d1536ea55230179d9ed90fbaf91909f1c3fd0
4
+ data.tar.gz: b7f4db3f4c160512bf5666a5b303aa67217ebe1d1a821748954d6602c9338bc5
5
5
  SHA512:
6
- metadata.gz: f2717dc3520c55adb260ea9f54350914cea1fc9076f32389b9aed762113b05ba63d3e5d51c37d01141e3f9a82abcb4d519c855b33d9623e501351733d648f461
7
- data.tar.gz: 37640b8a2e34e04a45116f5eb43304f904fe505861cfad0bcff825d23d284589af4afed1cbd0e2dd1e23a23a10ae01f12de0430f05670f485c6484b01e0567c6
6
+ metadata.gz: 429e23c494782d30cd07def008f905c628e80ec646d1d5ac0ffbebcc6a5c49dd1813974020f83607c3286e5870073cd5a97f9f6f0d4435bde03552843f0ff35f
7
+ data.tar.gz: 1775c4ccd206338334dbb9b6403406c4954f7781d1410ca91e479ab9ab12f58e8220ac4257c99d24c37c607fa28582da9d9f00d2b08da36f02a05b27d6493bde
@@ -61,8 +61,7 @@ module SolidusInter
61
61
  end
62
62
 
63
63
  def purchase(money, source, options = {})
64
- client = set_api_client
65
- inter_payment = client.get_payment(source.txid)
64
+ inter_payment = find_payment(source.txid)
66
65
  if inter_payment.paid?
67
66
  source.update(status: "approved")
68
67
  successful_response("Pagamento realizado", inter_payment.txid)
@@ -71,6 +70,15 @@ module SolidusInter
71
70
  end
72
71
  end
73
72
 
73
+ def should_skip_processing?(source)
74
+ inter_payment = find_payment(source.txid)
75
+ if inter_payment.paid?
76
+ false
77
+ else
78
+ true
79
+ end
80
+ end
81
+
74
82
  private
75
83
 
76
84
  def set_api_client
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SolidusInter
4
- VERSION = "0.0.2"
4
+ VERSION = "1.0.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_inter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ulysses
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-05-31 00:00:00.000000000 Z
11
+ date: 2024-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: solidus_core