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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fea401ec2462ff2cb94fdf9d6cfd6a41848218d82e8f4508e800403971fd0b50
4
- data.tar.gz: fed889f8f769bd3496edea6ae308b0e248164e8d4e7e1c72f1bd2be074a1b119
3
+ metadata.gz: 95072db3497c74ec37dd07c3f1d2dba96c9529e5fff2fa26a7ce42c9b6dcbc7a
4
+ data.tar.gz: 19a3fe6978a1e6f873e52ab1805a9001b1d07f4cbfa06cfefca455fb185816f1
5
5
  SHA512:
6
- metadata.gz: af7ca8d3382b4b2d90923234154a099efa76c0ff078f5ff055c15add338c8a6102cf88ab4104bd7d5e3afacdd5c1ccc45ebfac8320cb449ae6ead9d7a790feca
7
- data.tar.gz: accdeb14f72ecefed4785f0d1fc0102058bb2857ab4d9e498d9fa2f05c4bada7e4d5b0ab039c1f1dad904b9a81ca3ba48577c1973c50872c117edd55570e1c82
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
- TODO: Write usage instructions here
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
 
@@ -1,3 +1,3 @@
1
1
  module GmoServices
2
- VERSION = '0.1.3'.freeze
2
+ VERSION = '0.1.5'.freeze
3
3
  end
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
- I18n.load_path << Dir["#{File.expand_path('lib/config/locales')}/**/*.yml"]
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
- Config.load_and_set_settings('lib/config/settings.yml')
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.3
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-15 00:00:00.000000000 Z
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: '3.0'
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: '3.0'
82
+ version: '2.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rake
85
85
  requirement: !ruby/object:Gem::Requirement