paygate-ruby 0.2.1 → 0.2.2
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/CHANGELOG.md +6 -1
- data/lib/paygate/rails/engine.rb +8 -0
- data/lib/paygate/{action_view → rails}/form_helper.rb +4 -4
- data/lib/paygate/version.rb +1 -1
- data/lib/paygate.rb +8 -7
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b39137d4e1ac524c5a7a97e89c0619d70bf55a77ac236f0e5d3b07bc7a8628c4
|
|
4
|
+
data.tar.gz: 811eeec4c2cde838b821e45316bb18709426414315b51cc1b2c322594257bac0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 485d2199abb2a2bb5dd216e4b150c9f6a38e94de806465f8876bdb5f73086b9f85748f779479ffb3ab0d7f5a3eedc6a86c8884e7da8b4356293886d6e1c06723
|
|
7
|
+
data.tar.gz: 4c9620b441fed34e1fe9d9989c2c73477f2b2a12179467d5e98f1422fe12c256e96c9f2790cb8cf0db40a71f6348ea534ed06d2952932ab7fcb0fd43ee949d48
|
data/CHANGELOG.md
CHANGED
|
@@ -2,13 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
## Next
|
|
4
4
|
|
|
5
|
+
## 0.2.2 - 2023-04-26
|
|
6
|
+
|
|
7
|
+
- [PR#12](https://github.com/tablecheck/paygate-ruby/pull/12) Re-add Rails Engine (was dropped in version 0.2.0) ([johnnyshields](https://github.com/johnnyshields))
|
|
8
|
+
- [PR#12](https://github.com/tablecheck/paygate-ruby/pull/12) Rename Paygate::ActionView::FormHelper to Paygate::Rails::FormHelper. ([johnnyshields](https://github.com/johnnyshields))
|
|
9
|
+
|
|
5
10
|
## 0.2.1 - 2023-04-26
|
|
6
11
|
|
|
7
12
|
- [PR#11](https://github.com/tablecheck/paygate-ruby/pull/11) Deep freeze constants. ([johnnyshields](https://github.com/johnnyshields))
|
|
8
13
|
|
|
9
14
|
## 0.2.0 - 2023-04-26
|
|
10
15
|
|
|
11
|
-
- [PR#9](https://github.com/tablecheck/paygate-ruby/pull/9) Rename Paygate::FormHelper to Paygate::
|
|
16
|
+
- [PR#9](https://github.com/tablecheck/paygate-ruby/pull/9) Rename Paygate::FormHelper to Paygate::ActionView::FormHelper. ([johnnyshields](https://github.com/johnnyshields))
|
|
12
17
|
- [PR#9](https://github.com/tablecheck/paygate-ruby/pull/9) Do not include Paygate::FormHelper in ActionView::Base. ([johnnyshields](https://github.com/johnnyshields))
|
|
13
18
|
- [PR#9](https://github.com/tablecheck/paygate-ruby/pull/9) Update BIN list. Note BINs can now be a flexible number of digits. ([johnnyshields](https://github.com/johnnyshields))
|
|
14
19
|
- [PR#9](https://github.com/tablecheck/paygate-ruby/pull/9) Rename data config YAML keys. ([johnnyshields](https://github.com/johnnyshields))
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
module Paygate
|
|
4
|
-
module
|
|
4
|
+
module Rails
|
|
5
5
|
module FormHelper
|
|
6
|
-
PAYGATE_FORM_TEXT_FIELDS = {
|
|
6
|
+
(PAYGATE_FORM_TEXT_FIELDS = {
|
|
7
7
|
mid: {
|
|
8
8
|
placeholder: 'Member ID'
|
|
9
9
|
},
|
|
@@ -117,13 +117,13 @@ module Paygate
|
|
|
117
117
|
|
|
118
118
|
profile_no: {
|
|
119
119
|
placeholder: 'Profile No'
|
|
120
|
-
},
|
|
120
|
+
}.freeze,
|
|
121
121
|
|
|
122
122
|
hash_result: {
|
|
123
123
|
name: 'hashresult',
|
|
124
124
|
placeholder: 'Hash Result'
|
|
125
125
|
}
|
|
126
|
-
}.freeze
|
|
126
|
+
}.freeze).each_value(&:freeze)
|
|
127
127
|
|
|
128
128
|
def paygate_open_pay_api_js_url
|
|
129
129
|
if Paygate.configuration.mode == :live
|
data/lib/paygate/version.rb
CHANGED
data/lib/paygate.rb
CHANGED
|
@@ -9,19 +9,20 @@ require 'paygate/member'
|
|
|
9
9
|
require 'paygate/response'
|
|
10
10
|
require 'paygate/transaction'
|
|
11
11
|
require 'paygate/profile'
|
|
12
|
-
|
|
12
|
+
|
|
13
|
+
if defined?(Rails)
|
|
14
|
+
require 'paygate/rails/engine'
|
|
15
|
+
require 'paygate/rails/form_helper'
|
|
16
|
+
end
|
|
13
17
|
|
|
14
18
|
module Paygate
|
|
15
19
|
extend self
|
|
16
20
|
|
|
17
21
|
CONFIG = YAML.safe_load(File.read(File.expand_path('../data/config.yml', __dir__)),
|
|
18
22
|
permitted_classes: [Symbol]).freeze
|
|
19
|
-
LOCALES_MAP = CONFIG[:locales].freeze
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
INTL_BRANDS_MAP.each_value(&:freeze)
|
|
23
|
-
KOREA_BIN_NUMBERS = CONFIG[:korea_bin_numbers].freeze
|
|
24
|
-
KOREA_BIN_NUMBERS.each(&:freeze)
|
|
23
|
+
(LOCALES_MAP = CONFIG[:locales].freeze).each { |k, v| k.freeze; v.freeze } # rubocop:disable Style/Semicolon
|
|
24
|
+
(INTL_BRANDS_MAP = CONFIG[:intl_brands].freeze).each_value(&:freeze)
|
|
25
|
+
(KOREA_BIN_NUMBERS = CONFIG[:korea_bin_numbers].freeze).each(&:freeze)
|
|
25
26
|
DEFAULT_CURRENCY = 'WON'
|
|
26
27
|
DEFAULT_LOCALE = 'US'
|
|
27
28
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: paygate-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- jagdeepsingh
|
|
@@ -25,12 +25,13 @@ files:
|
|
|
25
25
|
- data/config.yml
|
|
26
26
|
- lib/paygate-ruby.rb
|
|
27
27
|
- lib/paygate.rb
|
|
28
|
-
- lib/paygate/action_view/form_helper.rb
|
|
29
28
|
- lib/paygate/aes.rb
|
|
30
29
|
- lib/paygate/aes_ctr.rb
|
|
31
30
|
- lib/paygate/configuration.rb
|
|
32
31
|
- lib/paygate/member.rb
|
|
33
32
|
- lib/paygate/profile.rb
|
|
33
|
+
- lib/paygate/rails/engine.rb
|
|
34
|
+
- lib/paygate/rails/form_helper.rb
|
|
34
35
|
- lib/paygate/response.rb
|
|
35
36
|
- lib/paygate/transaction.rb
|
|
36
37
|
- lib/paygate/version.rb
|