gmo_services 0.1.3 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +39 -2
- data/lib/gmo_services/version.rb +1 -1
- data/lib/gmo_services.rb +4 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95072db3497c74ec37dd07c3f1d2dba96c9529e5fff2fa26a7ce42c9b6dcbc7a
|
4
|
+
data.tar.gz: 19a3fe6978a1e6f873e52ab1805a9001b1d07f4cbfa06cfefca455fb185816f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 676296d487b4eba5c60e40276918648f2d804765dac7696793885ca09c927d8a7ff2ab7d939ca36dfaec4d6a2a8fbedb5a82335b3b2c8d350b9cdb72202f9249
|
7
|
+
data.tar.gz: ac3962ad097ec19ce6c3b576e09211184788356edc56142911beb4fe212cf19b26a778d768c8543476bed364c0207d9ebcc96a9b77b2e96bef91ac9ad0a58e45
|
data/README.md
CHANGED
@@ -21,8 +21,45 @@ Or install it yourself as:
|
|
21
21
|
$ gem install gmo_services
|
22
22
|
|
23
23
|
## Usage
|
24
|
-
|
25
|
-
|
24
|
+
```ruby
|
25
|
+
require 'gmo_services'
|
26
|
+
```
|
27
|
+
### Card functions
|
28
|
+
- Initialize Card class example:
|
29
|
+
```ruby
|
30
|
+
params = { shop_id: 'SHOP_ID', shop_pass: 'SHOP_PASS', base_api_url: 'https://foo.mul-pay.jp' }
|
31
|
+
card = GmoServices::Payments::Card.new(params)
|
32
|
+
```
|
33
|
+
|
34
|
+
- Entry transaction example:
|
35
|
+
```ruby
|
36
|
+
entry_transaction_params = { order_id: Time.now.to_i, job_cd: 'AUTH', amount: '1000' }
|
37
|
+
card.entry_transaction(entry_transaction_params)
|
38
|
+
```
|
39
|
+
|
40
|
+
- Execute transaction by token example:
|
41
|
+
```ruby
|
42
|
+
execute_transaction_by_token_params = { access_id: 'ACCESS_ID', access_pass: 'ACCESS_PASS', order_id: 'ORDER_ID', method: 1, token_type: 1, token: 'Token'}
|
43
|
+
card.execute_transaction_by_token(execute_transaction_by_token_params)
|
44
|
+
```
|
45
|
+
|
46
|
+
- Execute transaction by member example:
|
47
|
+
```ruby
|
48
|
+
execute_transaction_by_member_params = { access_id: 'ACCESS_ID', access_pass: 'ACCESS_PASS', order_id: 'ORDER_ID', method: 1, site_id: 'SITE_ID', site_pass: 'SITE_PASS', member_id: 'MEMBER_ID', card_seq: 'CARD_SEQ' }
|
49
|
+
card.execute_transaction_by_member(execute_transaction_by_member_params)
|
50
|
+
```
|
51
|
+
|
52
|
+
- Search transaction example:
|
53
|
+
```ruby
|
54
|
+
search_transaction_params = { order_id: 'ORDER_ID' }
|
55
|
+
card.search_transaction(search_transaction_params)
|
56
|
+
```
|
57
|
+
|
58
|
+
- Cancel transaction example:
|
59
|
+
```ruby
|
60
|
+
cancel_transaction_params = { access_id: 'ACCESS_ID', access_pass: 'ACCESS_PASS' }
|
61
|
+
card.cancel_transaction(cancel_transaction_params)
|
62
|
+
```
|
26
63
|
|
27
64
|
## Development
|
28
65
|
|
data/lib/gmo_services/version.rb
CHANGED
data/lib/gmo_services.rb
CHANGED
@@ -6,10 +6,12 @@ require 'net/http'
|
|
6
6
|
require 'rack/utils'
|
7
7
|
|
8
8
|
require 'i18n'
|
9
|
-
|
9
|
+
english_locale_file_path = File.join(File.dirname(__FILE__), 'config/locales/gmo_error_info/en.yml')
|
10
|
+
I18n.load_path << english_locale_file_path
|
10
11
|
|
11
12
|
require 'config'
|
12
|
-
|
13
|
+
settings_file_path = File.join(File.dirname(__FILE__), 'config/settings.yml')
|
14
|
+
Config.load_and_set_settings(settings_file_path)
|
13
15
|
|
14
16
|
module GmoServices
|
15
17
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gmo_services
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- NGUYEN THANH VIET
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-10-
|
11
|
+
date: 2022-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: config
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '2.0'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '2.0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rake
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|