tappay_ruby 0.13.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: 78d1845e1cf067321da1cb3ba50549977a603e108dc0face1028e6689aa9166f
4
- data.tar.gz: 829c00cc486a61e5fbb3aa62622675aea3a93459a8bbbb2c07cc92eb19ccf043
3
+ metadata.gz: 30a0a7672bbced59b2ff0ef6903782a1e451e63a7396044be89bfe8270e68fe0
4
+ data.tar.gz: 9ef971abeaa9a67078161aec185cc0e593d3a0fd830928d4e6e5e3e722a96e5b
5
5
  SHA512:
6
- metadata.gz: 4e4965d9c80e37e27677f5422afecd810e5ea54b8d15d6e98b5137e2b6b9d985906f7ee67b8d7e1272960fe3ed6005502b0a4919fdd020c9fd76fbd9d1e3985c
7
- data.tar.gz: f375a8ca5b55d698564223ff43a248381227b20df985ec5e2d2ff6bed09c662517b59c1f3680b91309014409c3840b47a23a15b1f0ef98edbdc52599c54acc0a
6
+ metadata.gz: 806ffac0928ab096a8d15bc28dc3ef10ed4e55c4ffdd9a27d84678992e34cfa89e6486a206af66068a0dd06e7c8f2c934b37826c0ed9121fb146d01643f8dc7b
7
+ data.tar.gz: b32fed3a1c14b5b1d56487dfe2adc8da85e4154d3c94c2c9d75143cd89f144980badafdc9fd3c2fb5e642496af0324c6aa51c5af57153fae265fea4130d0604a
data/README.md CHANGED
@@ -13,6 +13,7 @@ A Ruby library for integrating with TapPay payment services. This gem provides a
13
13
  - Instalment payments (3, 6, 12, 18, 24, 30 months)
14
14
  - Line Pay
15
15
  - JKO Pay
16
+ - Apple Pay
16
17
  - Flexible merchant identification:
17
18
  - Support for both `merchant_id` and `merchant_group_id`
18
19
  - Automatic fallback handling
@@ -0,0 +1,31 @@
1
+ require 'json'
2
+
3
+ module Tappay
4
+ module ApplePay
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.apple_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
@@ -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.13.0"
4
+ VERSION = "0.14.1"
5
5
  end
data/lib/tappay.rb CHANGED
@@ -18,6 +18,8 @@ require_relative "tappay/credit_card/refund"
18
18
  require_relative "tappay/credit_card/instalment"
19
19
  require_relative "tappay/line_pay/pay"
20
20
  require_relative "tappay/jko_pay/pay"
21
+ require_relative "tappay/apple_pay/pay"
22
+ require_relative "tappay/google_pay/pay"
21
23
 
22
24
  module Tappay
23
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.13.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-13 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
@@ -75,6 +75,7 @@ extra_rdoc_files: []
75
75
  files:
76
76
  - README.md
77
77
  - lib/tappay.rb
78
+ - lib/tappay/apple_pay/pay.rb
78
79
  - lib/tappay/card_holder.rb
79
80
  - lib/tappay/client.rb
80
81
  - lib/tappay/configuration.rb
@@ -83,6 +84,7 @@ files:
83
84
  - lib/tappay/credit_card/refund.rb
84
85
  - lib/tappay/endpoints.rb
85
86
  - lib/tappay/errors.rb
87
+ - lib/tappay/google_pay/pay.rb
86
88
  - lib/tappay/jko_pay/pay.rb
87
89
  - lib/tappay/line_pay/pay.rb
88
90
  - lib/tappay/payment_base.rb