solidus_inter 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/models/solidus_inter/inter_pix.rb +3 -6
- data/lib/generators/solidus_inter/install/install_generator.rb +0 -4
- data/lib/solidus_inter/version.rb +1 -1
- data/lib/solidus_inter.rb +17 -1
- metadata +6 -8
- data/lib/generators/solidus_inter/install/templates/initializer.rb +0 -6
- data/lib/solidus_inter/configuration.rb +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d3f4f88f750274042d3b1bd94367712b3dd24b8a17fd9cd122849b0f8cd9b40
|
4
|
+
data.tar.gz: f8e470ebe491c5c6cfa92f08efe915652962a1a36c44aa0b0bdaefbd303614eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9dcabfbb7137fb2a2aa98d647ee892faf7a778f6478cd6fe291be91194a3b3ab5ada12d3b96ed413cb40e843e2aba94204909da9435d10d154e4f18e31eb69ab
|
7
|
+
data.tar.gz: 8ab1645e4c3883dc5450284b2e29170bca5d49b059cf8c70d722d3fffa60163422fd983fbc3c069fdc79f759b056ea4f4d24e277dca2180ac4e90e0f06f8b6d1
|
@@ -74,11 +74,7 @@ module SolidusInter
|
|
74
74
|
|
75
75
|
def should_skip_processing?(source)
|
76
76
|
inter_payment = find_payment(source.txid)
|
77
|
-
|
78
|
-
false
|
79
|
-
else
|
80
|
-
true
|
81
|
-
end
|
77
|
+
!inter_payment.paid?
|
82
78
|
end
|
83
79
|
|
84
80
|
private
|
@@ -93,7 +89,8 @@ module SolidusInter
|
|
93
89
|
crt: temp_file(preferences[:crt]).path,
|
94
90
|
key: temp_file(preferences[:key]).path,
|
95
91
|
token: account&.token,
|
96
|
-
token_expires_at: account&.expires_at
|
92
|
+
token_expires_at: account&.expires_at,
|
93
|
+
test_mode: preferences[:test_mode]
|
97
94
|
)
|
98
95
|
SolidusInter::Account.upsert({token: client.token, expires_at: client.token_expires_at, chave_pix: client.chave_pix, spree_payment_method_id: id}, unique_by: :chave_pix)
|
99
96
|
client
|
data/lib/solidus_inter.rb
CHANGED
@@ -1,6 +1,22 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "solidus_inter/configuration"
|
4
3
|
require "solidus_inter/version"
|
5
4
|
require "solidus_inter/engine"
|
6
5
|
require "inter_api"
|
6
|
+
|
7
|
+
module SolidusInter
|
8
|
+
class Error < StandardError; end
|
9
|
+
|
10
|
+
class Configuration
|
11
|
+
# mattr_accessor :api_key
|
12
|
+
# @@api_key = nil
|
13
|
+
|
14
|
+
# def initialize
|
15
|
+
# raise "Do not instatiate this class. Access configuration variables directly: SolidusInter::Configuration.api_key"
|
16
|
+
# end
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.configure
|
20
|
+
yield(Configuration)
|
21
|
+
end
|
22
|
+
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: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ulysses
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: solidus_core
|
@@ -123,9 +123,7 @@ files:
|
|
123
123
|
- db/migrate/20240527193953_create_solidus_inter_pix_payment_sources.rb
|
124
124
|
- db/migrate/20240603132203_create_solidus_inter_accounts.rb
|
125
125
|
- lib/generators/solidus_inter/install/install_generator.rb
|
126
|
-
- lib/generators/solidus_inter/install/templates/initializer.rb
|
127
126
|
- lib/solidus_inter.rb
|
128
|
-
- lib/solidus_inter/configuration.rb
|
129
127
|
- lib/solidus_inter/engine.rb
|
130
128
|
- lib/solidus_inter/testing_support/factories.rb
|
131
129
|
- lib/solidus_inter/version.rb
|
@@ -137,7 +135,7 @@ metadata:
|
|
137
135
|
homepage_uri: https://github.com/ulysses-bull/solidus_inter#readme
|
138
136
|
source_code_uri: https://github.com/ulysses-bull/solidus_inter
|
139
137
|
changelog_uri: https://github.com/ulysses-bull/solidus_inter/blob/main/CHANGELOG.md
|
140
|
-
post_install_message:
|
138
|
+
post_install_message:
|
141
139
|
rdoc_options: []
|
142
140
|
require_paths:
|
143
141
|
- lib
|
@@ -155,8 +153,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
155
153
|
- !ruby/object:Gem::Version
|
156
154
|
version: '0'
|
157
155
|
requirements: []
|
158
|
-
rubygems_version: 3.5.
|
159
|
-
signing_key:
|
156
|
+
rubygems_version: 3.5.10
|
157
|
+
signing_key:
|
160
158
|
specification_version: 4
|
161
159
|
summary: ''
|
162
160
|
test_files: []
|
@@ -1,21 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module SolidusInter
|
4
|
-
class Configuration
|
5
|
-
# Define here the settings for this extension, e.g.:
|
6
|
-
#
|
7
|
-
# attr_accessor :my_setting
|
8
|
-
end
|
9
|
-
|
10
|
-
class << self
|
11
|
-
def configuration
|
12
|
-
@configuration ||= Configuration.new
|
13
|
-
end
|
14
|
-
|
15
|
-
alias_method :config, :configuration
|
16
|
-
|
17
|
-
def configure
|
18
|
-
yield configuration
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|