tappay_ruby 0.4.0 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -2
- data/lib/tappay/client.rb +1 -1
- data/lib/tappay/credit_card/pay.rb +2 -2
- data/lib/tappay/transaction/query.rb +4 -1
- data/lib/tappay/version.rb +1 -1
- metadata +3 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a31a7dd2dae54e34e6cb67c26d2063bb55ee28a313c87164ff362ff0b3cff405
|
4
|
+
data.tar.gz: 8103f3a1bb11d48a7781a735eeba2afc75bb4a6b1d2d2d590b1bd3dcb211fc63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d575276fde2cb8fcb25404efb44b504079075243c9c72293825edb967e0f97a418a65928fc94f69a120ae7c664528038e941ad9332d9b7abcee4d3313fbd85e1
|
7
|
+
data.tar.gz: 8f3851d3008f156ecf7c63b9ae4d24ff79604271b2d056d662c24bc4183a7c97187cdb5d4540d16e989789af9e3bf226a63756d8d4b0c750326f3a2586f11891
|
data/README.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# TapPay Ruby Gem
|
2
2
|
|
3
|
+
[![RSpec](https://github.com/7a6163/tappay/actions/workflows/rspec.yml/badge.svg)](https://github.com/7a6163/tappay/actions/workflows/rspec.yml)
|
4
|
+
[![codecov](https://codecov.io/gh/7a6163/tappay/branch/main/graph/badge.svg)](https://codecov.io/gh/7a6163/tappay)
|
5
|
+
|
3
6
|
A Ruby library for integrating with TapPay payment services. This gem provides a simple and elegant way to process payments, refunds, and handle instalments through TapPay's payment gateway.
|
4
7
|
|
5
8
|
## Features
|
@@ -148,7 +151,6 @@ result = Tappay::CreditCard::Pay.by_prime(
|
|
148
151
|
amount: 100,
|
149
152
|
order_number: 'ORDER-123',
|
150
153
|
currency: 'TWD',
|
151
|
-
redirect_url: 'https://your-site.com/return',
|
152
154
|
three_domain_secure: true, # Enable 3D secure if needed
|
153
155
|
remember: true, # Set to true if you want to store the card for future payments
|
154
156
|
card_holder: card_holder # Optional cardholder information
|
@@ -178,7 +180,6 @@ result = Tappay::CreditCard::Pay.by_token(
|
|
178
180
|
amount: 100,
|
179
181
|
order_number: 'ORDER-124',
|
180
182
|
currency: 'TWD',
|
181
|
-
redirect_url: 'https://your-site.com/return',
|
182
183
|
three_domain_secure: true, # Enable 3D secure if needed
|
183
184
|
card_holder: card_holder # Optional cardholder information
|
184
185
|
)
|
data/lib/tappay/client.rb
CHANGED
@@ -24,11 +24,11 @@ module Tappay
|
|
24
24
|
details: options[:details],
|
25
25
|
currency: options[:currency] || 'TWD',
|
26
26
|
order_number: options[:order_number],
|
27
|
-
redirect_url: options[:redirect_url],
|
28
27
|
three_domain_secure: options[:three_domain_secure] || false
|
29
28
|
}.tap do |data|
|
30
29
|
data[:cardholder] = card_holder_data if options[:cardholder]
|
31
30
|
data[:instalment] = options[:instalment] if options[:instalment]
|
31
|
+
data[:payment_url] = options[:payment_url] if options[:payment_url]
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
@@ -49,7 +49,7 @@ module Tappay
|
|
49
49
|
required = base_required_options + additional_required_options
|
50
50
|
missing = required.select { |key| options[key].nil? }
|
51
51
|
raise ValidationError, "Missing required options: #{missing.join(', ')}" if missing.any?
|
52
|
-
|
52
|
+
|
53
53
|
validate_instalment! if options[:instalment]
|
54
54
|
end
|
55
55
|
|
@@ -14,10 +14,13 @@ module Tappay
|
|
14
14
|
def execute
|
15
15
|
client = Tappay::Client.new
|
16
16
|
response = client.post(Endpoints::Transaction.query_url, request_params)
|
17
|
-
|
17
|
+
|
18
18
|
{
|
19
19
|
status: response['status'],
|
20
20
|
msg: response['msg'],
|
21
|
+
records_per_page: response['records_per_page'],
|
22
|
+
page: response['page'],
|
23
|
+
total_page_count: response['total_page_count'],
|
21
24
|
number_of_transactions: response['number_of_transactions'],
|
22
25
|
trade_records: parse_trade_records(response['trade_records'])
|
23
26
|
}
|
data/lib/tappay/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tappay_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zac
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date: 2024-12-
|
10
|
+
date: 2024-12-30 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: httparty
|
@@ -94,7 +93,6 @@ metadata:
|
|
94
93
|
homepage_uri: https://github.com/7a6163/tappay
|
95
94
|
source_code_uri: https://github.com/7a6163/tappay
|
96
95
|
changelog_uri: https://github.com/7a6163/tappay/blob/main/CHANGELOG.md
|
97
|
-
post_install_message:
|
98
96
|
rdoc_options: []
|
99
97
|
require_paths:
|
100
98
|
- lib
|
@@ -109,8 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
107
|
- !ruby/object:Gem::Version
|
110
108
|
version: '0'
|
111
109
|
requirements: []
|
112
|
-
rubygems_version: 3.
|
113
|
-
signing_key:
|
110
|
+
rubygems_version: 3.6.2
|
114
111
|
specification_version: 4
|
115
112
|
summary: Ruby wrapper for TapPay payment gateway
|
116
113
|
test_files: []
|