tappay_ruby 0.14.0 → 0.14.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: ade6bcb902e1c8c4a0d769f1e0f9612283421e584d65fcc504a18e4e767a8bdf
4
- data.tar.gz: 6c25fcce141f018cb3135dfcaaef01085260823efdea191dbe49ce72e4b624e0
3
+ metadata.gz: 30a0a7672bbced59b2ff0ef6903782a1e451e63a7396044be89bfe8270e68fe0
4
+ data.tar.gz: 9ef971abeaa9a67078161aec185cc0e593d3a0fd830928d4e6e5e3e722a96e5b
5
5
  SHA512:
6
- metadata.gz: 686e230cf8f1b6d1640f7cd07d3b3e19e77f9afab1cc643afb5289be97199f657dce1dd4223392350f976fbfb4586f78307394a635974df9c792af6ba1ee2d6d
7
- data.tar.gz: 2642b4276ca7e059680961701531575028dcb2b1812bdfde0f114bd853250fabec898518c65ca4d2e695d7bc07428c15a6cb144452a1752a9fb6a05a38af78be
6
+ metadata.gz: 806ffac0928ab096a8d15bc28dc3ef10ed4e55c4ffdd9a27d84678992e34cfa89e6486a206af66068a0dd06e7c8f2c934b37826c0ed9121fb146d01643f8dc7b
7
+ data.tar.gz: b32fed3a1c14b5b1d56487dfe2adc8da85e4154d3c94c2c9d75143cd89f144980badafdc9fd3c2fb5e642496af0324c6aa51c5af57153fae265fea4130d0604a
@@ -3,7 +3,8 @@
3
3
  module Tappay
4
4
  class Configuration
5
5
  attr_accessor :partner_key, :merchant_id, :merchant_group_id, :instalment_merchant_id,
6
- :line_pay_merchant_id, :jko_pay_merchant_id, :app_id, :currency, :vat_number
6
+ :line_pay_merchant_id, :jko_pay_merchant_id, :app_id, :currency, :vat_number,
7
+ :google_pay_merchant_id, :apple_pay_merchant_id
7
8
  attr_writer :api_version
8
9
 
9
10
  def initialize
@@ -0,0 +1,31 @@
1
+ require 'json'
2
+
3
+ module Tappay
4
+ module GooglePay
5
+ class Pay < PaymentBase
6
+ def initialize(client)
7
+ super(client)
8
+ end
9
+
10
+ private
11
+
12
+ def get_merchant_id
13
+ return nil if Tappay.configuration.merchant_group_id
14
+
15
+ Tappay.configuration.google_pay_merchant_id || super
16
+ end
17
+
18
+ def additional_required_options
19
+ [:prime, :cardholder]
20
+ end
21
+
22
+ protected
23
+
24
+ def payment_data
25
+ super.merge(
26
+ prime: options[:prime]
27
+ )
28
+ end
29
+ end
30
+ end
31
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tappay
4
- VERSION = "0.14.0"
4
+ VERSION = "0.14.1"
5
5
  end
data/lib/tappay.rb CHANGED
@@ -19,6 +19,7 @@ require_relative "tappay/credit_card/instalment"
19
19
  require_relative "tappay/line_pay/pay"
20
20
  require_relative "tappay/jko_pay/pay"
21
21
  require_relative "tappay/apple_pay/pay"
22
+ require_relative "tappay/google_pay/pay"
22
23
 
23
24
  module Tappay
24
25
  class Error < StandardError; 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.14.0
4
+ version: 0.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zac
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-01-17 00:00:00.000000000 Z
10
+ date: 2025-01-21 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: httparty
@@ -84,6 +84,7 @@ files:
84
84
  - lib/tappay/credit_card/refund.rb
85
85
  - lib/tappay/endpoints.rb
86
86
  - lib/tappay/errors.rb
87
+ - lib/tappay/google_pay/pay.rb
87
88
  - lib/tappay/jko_pay/pay.rb
88
89
  - lib/tappay/line_pay/pay.rb
89
90
  - lib/tappay/payment_base.rb