tappay_ruby 0.11.0 → 0.12.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 920fd5c582914989062cb76fc47306e6ec3b4714b2558e2d4f04e2e43c4c11a0
4
- data.tar.gz: 85a9f5331b47bdfbb78f81da3236d5123086f873e1260fb68b5c757bb7984e1d
3
+ metadata.gz: 3c06097c577042d4efb81f434670795a3247ed8badd8e6fd7efcd41436373942
4
+ data.tar.gz: d9ff01cc3df47d3333328bf8593bd99afa91b995ea5aea00dbc98dda91b825c4
5
5
  SHA512:
6
- metadata.gz: 9fb651e7b40a652a725896d697a75a3e47484f58bc64102b057bfa2a8b049f0427b8c1bdb0dcaa229d84f999898e291b9bfd36548e0ce012fdff4cb706201b03
7
- data.tar.gz: 62b665b0e9d15c07966cc61998d215ff2e531a1664d5dffd824b9fc116db93a4c031f1f5271e5701cc445793056bd167ca561c6688064a281707dcba17e27839
6
+ metadata.gz: a60520e14ad7946a7768e00f8c4044260266eb95363a18a884c4e33e0dc37610df4af584ff5883ce5799f3981556784bdb767c3d185dc4ea769d00395545a6f7
7
+ data.tar.gz: ed3fcbaae8b9154635f13c1f94e5259d33a560e3f5269f8bbf825516ebd78e5c77ef4466161f3d38b042aa903620a064fdd13f68b82f2c65644dc1dca2f73c43
@@ -3,11 +3,6 @@
3
3
  module Tappay
4
4
  module JkoPay
5
5
  class Pay < PaymentBase
6
- def initialize(options = {})
7
- super
8
- validate_jko_pay_options!
9
- end
10
-
11
6
  def endpoint_url
12
7
  Endpoints::Payment.pay_by_prime_url
13
8
  end
@@ -17,19 +12,16 @@ module Tappay
17
12
  def get_merchant_id
18
13
  # If merchant_group_id is set, it takes precedence
19
14
  return nil if Tappay.configuration.merchant_group_id
20
-
15
+
21
16
  # Otherwise, use jko_pay_merchant_id or fall back to default merchant_id
22
17
  Tappay.configuration.jko_pay_merchant_id || super
23
18
  end
24
19
 
25
- def validate_jko_pay_options!
26
- validate_result_urls!
20
+ def additional_required_options
21
+ [:prime, :frontend_redirect_url, :backend_notify_url]
27
22
  end
28
23
 
29
- def validate_result_urls!
30
- raise ValidationError, 'frontend_redirect_url is required for JKO Pay' if options[:frontend_redirect_url].nil?
31
- raise ValidationError, 'backend_notify_url is required for JKO Pay' if options[:backend_notify_url].nil?
32
- end
24
+ protected
33
25
 
34
26
  def payment_data
35
27
  data = super
@@ -38,7 +30,6 @@ module Tappay
38
30
  backend_notify_url: options[:backend_notify_url]
39
31
  }
40
32
  data[:prime] = options[:prime]
41
- data[:remember] = options[:remember] || false
42
33
  data
43
34
  end
44
35
  end
@@ -5,17 +5,6 @@ require 'tappay/payment_base'
5
5
  module Tappay
6
6
  module LinePay
7
7
  class Pay < PaymentBase
8
- def payment_data
9
- super.merge(
10
- prime: options[:prime],
11
- result_url: {
12
- frontend_redirect_url: options[:frontend_redirect_url],
13
- backend_notify_url: options[:backend_notify_url]
14
- },
15
- remember: options[:remember] || false
16
- )
17
- end
18
-
19
8
  def endpoint_url
20
9
  Tappay::Endpoints::Payment.pay_by_prime_url
21
10
  end
@@ -25,7 +14,7 @@ module Tappay
25
14
  def get_merchant_id
26
15
  # If merchant_group_id is set, it takes precedence
27
16
  return nil if Tappay.configuration.merchant_group_id
28
-
17
+
29
18
  # Otherwise, use line_pay_merchant_id or fall back to default merchant_id
30
19
  Tappay.configuration.line_pay_merchant_id || super
31
20
  end
@@ -33,6 +22,18 @@ module Tappay
33
22
  def additional_required_options
34
23
  [:prime, :frontend_redirect_url, :backend_notify_url]
35
24
  end
25
+
26
+ protected
27
+
28
+ def payment_data
29
+ super.merge(
30
+ prime: options[:prime],
31
+ result_url: {
32
+ frontend_redirect_url: options[:frontend_redirect_url],
33
+ backend_notify_url: options[:backend_notify_url]
34
+ }
35
+ )
36
+ end
36
37
  end
37
38
  end
38
- end
39
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tappay
4
- VERSION = "0.11.0"
4
+ VERSION = "0.12.1"
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tappay_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zac
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-01-02 00:00:00.000000000 Z
10
+ date: 2025-01-12 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: httparty