gmo_services 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CODE_OF_CONDUCT.md +74 -74
- data/LICENSE.txt +21 -21
- data/README.md +81 -81
- data/lib/config/locales/gmo_error_info/en.yml +1233 -1233
- data/lib/config/settings.yml +14 -14
- data/lib/gmo_services/payments/base.rb +35 -35
- data/lib/gmo_services/payments/card.rb +117 -100
- data/lib/gmo_services/payments/error.rb +28 -28
- data/lib/gmo_services/payments/member.rb +121 -121
- data/lib/gmo_services/payments/settings.rb +9 -0
- data/lib/gmo_services/version.rb +3 -3
- data/lib/gmo_services.rb +17 -17
- metadata +4 -3
data/lib/config/settings.yml
CHANGED
@@ -1,14 +1,14 @@
|
|
1
|
-
payments:
|
2
|
-
card:
|
3
|
-
entry_transaction_api_url: '/payment/EntryTran.idPass'
|
4
|
-
execute_transaction_api_url: '/payment/ExecTran.idPass'
|
5
|
-
search_transaction_api_url: '/payment/SearchTrade.idPass'
|
6
|
-
alter_transaction_api_url: '/payment/AlterTran.idPass'
|
7
|
-
member:
|
8
|
-
register_member_api_url: '/payment/SaveMember.idPass'
|
9
|
-
search_member_api_url: '/payment/SearchMember.idPass'
|
10
|
-
update_member_api_url: '/payment/UpdateMember.idPass'
|
11
|
-
delete_member_api_url: '/payment/DeleteMember.idPass'
|
12
|
-
add_card_to_member_api_url: '/payment/SaveCard.idPass'
|
13
|
-
search_card_api_url: '/payment/SearchCard.idPass'
|
14
|
-
delete_card_api_url: '/payment/DeleteCard.idPass'
|
1
|
+
payments:
|
2
|
+
card:
|
3
|
+
entry_transaction_api_url: '/payment/EntryTran.idPass'
|
4
|
+
execute_transaction_api_url: '/payment/ExecTran.idPass'
|
5
|
+
search_transaction_api_url: '/payment/SearchTrade.idPass'
|
6
|
+
alter_transaction_api_url: '/payment/AlterTran.idPass'
|
7
|
+
member:
|
8
|
+
register_member_api_url: '/payment/SaveMember.idPass'
|
9
|
+
search_member_api_url: '/payment/SearchMember.idPass'
|
10
|
+
update_member_api_url: '/payment/UpdateMember.idPass'
|
11
|
+
delete_member_api_url: '/payment/DeleteMember.idPass'
|
12
|
+
add_card_to_member_api_url: '/payment/SaveCard.idPass'
|
13
|
+
search_card_api_url: '/payment/SearchCard.idPass'
|
14
|
+
delete_card_api_url: '/payment/DeleteCard.idPass'
|
@@ -1,35 +1,35 @@
|
|
1
|
-
module GmoServices
|
2
|
-
module Payments
|
3
|
-
class Base
|
4
|
-
attr_reader :site_id, :site_pass, :shop_id, :shop_pass, :base_api_url, :settings
|
5
|
-
|
6
|
-
def initialize(params = {})
|
7
|
-
@site_id = params[:site_id]
|
8
|
-
@site_pass = params[:site_pass]
|
9
|
-
@shop_id = params[:shop_id]
|
10
|
-
@shop_pass = params[:shop_pass]
|
11
|
-
@base_api_url = params[:base_api_url]
|
12
|
-
@settings = initialize_settings
|
13
|
-
end
|
14
|
-
|
15
|
-
private
|
16
|
-
|
17
|
-
def post_request(api_url, params = {})
|
18
|
-
url = URI(base_api_url + api_url)
|
19
|
-
response = Net::HTTP.post_form(url, params)
|
20
|
-
response_body = Rack::Utils.parse_query(response.body)
|
21
|
-
return response_body unless response_body['ErrInfo']
|
22
|
-
|
23
|
-
raise_error(response_body)
|
24
|
-
end
|
25
|
-
|
26
|
-
def raise_error(response_body)
|
27
|
-
Error.new(response_body).call
|
28
|
-
end
|
29
|
-
|
30
|
-
def initialize_settings
|
31
|
-
raise NotImplementedError
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
1
|
+
module GmoServices
|
2
|
+
module Payments
|
3
|
+
class Base
|
4
|
+
attr_reader :site_id, :site_pass, :shop_id, :shop_pass, :base_api_url, :settings
|
5
|
+
|
6
|
+
def initialize(params = {})
|
7
|
+
@site_id = params[:site_id]
|
8
|
+
@site_pass = params[:site_pass]
|
9
|
+
@shop_id = params[:shop_id]
|
10
|
+
@shop_pass = params[:shop_pass]
|
11
|
+
@base_api_url = params[:base_api_url]
|
12
|
+
@settings = initialize_settings
|
13
|
+
end
|
14
|
+
|
15
|
+
private
|
16
|
+
|
17
|
+
def post_request(api_url, params = {})
|
18
|
+
url = URI(base_api_url + api_url)
|
19
|
+
response = Net::HTTP.post_form(url, params)
|
20
|
+
response_body = Rack::Utils.parse_query(response.body)
|
21
|
+
return response_body unless response_body['ErrInfo']
|
22
|
+
|
23
|
+
raise_error(response_body)
|
24
|
+
end
|
25
|
+
|
26
|
+
def raise_error(response_body)
|
27
|
+
Error.new(response_body).call
|
28
|
+
end
|
29
|
+
|
30
|
+
def initialize_settings
|
31
|
+
raise NotImplementedError
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -1,100 +1,117 @@
|
|
1
|
-
require 'gmo_services/payments/base'
|
2
|
-
|
3
|
-
module GmoServices
|
4
|
-
module Payments
|
5
|
-
class Card < Base
|
6
|
-
def entry_transaction(params)
|
7
|
-
api_url = settings.entry_transaction_api_url
|
8
|
-
params = initialize_params_of_entry_transaction(params)
|
9
|
-
post_request(api_url, params)
|
10
|
-
end
|
11
|
-
|
12
|
-
def execute_transaction_by_token(params)
|
13
|
-
api_url = settings.execute_transaction_api_url
|
14
|
-
params = initialize_params_of_execute_transaction_by_token(params)
|
15
|
-
post_request(api_url, params)
|
16
|
-
end
|
17
|
-
|
18
|
-
def execute_transaction_by_member(params)
|
19
|
-
api_url = settings.execute_transaction_api_url
|
20
|
-
params = initialize_params_of_execute_transaction_by_member(params)
|
21
|
-
post_request(api_url, params)
|
22
|
-
end
|
23
|
-
|
24
|
-
def search_transaction(params)
|
25
|
-
api_url = settings.search_transaction_api_url
|
26
|
-
params = initialize_params_of_search_transaction(params)
|
27
|
-
post_request(api_url, params)
|
28
|
-
end
|
29
|
-
|
30
|
-
def cancel_transaction(params)
|
31
|
-
api_url = settings.alter_transaction_api_url
|
32
|
-
params = initialize_params_of_cancel_transaction(params)
|
33
|
-
post_request(api_url, params)
|
34
|
-
end
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
end
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
default_params
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
1
|
+
require 'gmo_services/payments/base'
|
2
|
+
|
3
|
+
module GmoServices
|
4
|
+
module Payments
|
5
|
+
class Card < Base
|
6
|
+
def entry_transaction(params)
|
7
|
+
api_url = settings.entry_transaction_api_url
|
8
|
+
params = initialize_params_of_entry_transaction(params)
|
9
|
+
post_request(api_url, params)
|
10
|
+
end
|
11
|
+
|
12
|
+
def execute_transaction_by_token(params)
|
13
|
+
api_url = settings.execute_transaction_api_url
|
14
|
+
params = initialize_params_of_execute_transaction_by_token(params)
|
15
|
+
post_request(api_url, params)
|
16
|
+
end
|
17
|
+
|
18
|
+
def execute_transaction_by_member(params)
|
19
|
+
api_url = settings.execute_transaction_api_url
|
20
|
+
params = initialize_params_of_execute_transaction_by_member(params)
|
21
|
+
post_request(api_url, params)
|
22
|
+
end
|
23
|
+
|
24
|
+
def search_transaction(params)
|
25
|
+
api_url = settings.search_transaction_api_url
|
26
|
+
params = initialize_params_of_search_transaction(params)
|
27
|
+
post_request(api_url, params)
|
28
|
+
end
|
29
|
+
|
30
|
+
def cancel_transaction(params)
|
31
|
+
api_url = settings.alter_transaction_api_url
|
32
|
+
params = initialize_params_of_cancel_transaction(params)
|
33
|
+
post_request(api_url, params)
|
34
|
+
end
|
35
|
+
|
36
|
+
def update_transaction_to_actual_sale(params)
|
37
|
+
api_url = settings.alter_transaction_api_url
|
38
|
+
params = initialize_params_of_update_transaction_to_actual_sale(params)
|
39
|
+
post_request(api_url, params)
|
40
|
+
end
|
41
|
+
|
42
|
+
private
|
43
|
+
|
44
|
+
def initialize_settings
|
45
|
+
Settings.payments.card
|
46
|
+
end
|
47
|
+
|
48
|
+
def initialize_params_of_entry_transaction(params)
|
49
|
+
{
|
50
|
+
ShopID: shop_id,
|
51
|
+
ShopPass: shop_pass,
|
52
|
+
OrderID: params[:order_id],
|
53
|
+
JobCd: params[:job_cd],
|
54
|
+
Amount: params[:amount]
|
55
|
+
}
|
56
|
+
end
|
57
|
+
|
58
|
+
def initialize_default_params_of_execute_transaction(params)
|
59
|
+
{
|
60
|
+
AccessID: params[:access_id],
|
61
|
+
AccessPass: params[:access_pass],
|
62
|
+
OrderID: params[:order_id],
|
63
|
+
Method: params[:method],
|
64
|
+
PayTimes: params[:pay_times],
|
65
|
+
PIN: params[:pin]
|
66
|
+
}
|
67
|
+
end
|
68
|
+
|
69
|
+
def initialize_params_of_execute_transaction_by_token(params)
|
70
|
+
default_params = initialize_default_params_of_execute_transaction(params)
|
71
|
+
default_params.merge(TokenType: params[:token_type], Token: params[:token])
|
72
|
+
end
|
73
|
+
|
74
|
+
def initialize_params_of_execute_transaction_by_member(params)
|
75
|
+
default_params = initialize_default_params_of_execute_transaction(params)
|
76
|
+
default_params.merge(
|
77
|
+
SiteID: params[:site_id],
|
78
|
+
SitePass: params[:site_pass],
|
79
|
+
MemberID: params[:member_id],
|
80
|
+
CardSeq: params[:card_seq],
|
81
|
+
SeqMode: params[:seq_mode],
|
82
|
+
CardPass: params[:card_pass],
|
83
|
+
SecurityCode: params[:security_code]
|
84
|
+
)
|
85
|
+
end
|
86
|
+
|
87
|
+
def initialize_params_of_search_transaction(params)
|
88
|
+
{
|
89
|
+
ShopID: shop_id,
|
90
|
+
ShopPass: shop_pass,
|
91
|
+
OrderID: params[:order_id]
|
92
|
+
}
|
93
|
+
end
|
94
|
+
|
95
|
+
def initialize_params_of_cancel_transaction(params)
|
96
|
+
{
|
97
|
+
ShopID: shop_id,
|
98
|
+
ShopPass: shop_pass,
|
99
|
+
AccessID: params[:access_id],
|
100
|
+
AccessPass: params[:access_pass],
|
101
|
+
JobCd: 'CANCEL'
|
102
|
+
}
|
103
|
+
end
|
104
|
+
|
105
|
+
def initialize_params_of_update_transaction_to_actual_sale(params)
|
106
|
+
{
|
107
|
+
ShopID: shop_id,
|
108
|
+
ShopPass: shop_pass,
|
109
|
+
AccessID: params[:access_id],
|
110
|
+
AccessPass: params[:access_pass],
|
111
|
+
Amount: params[:amount],
|
112
|
+
JobCd: 'SALES'
|
113
|
+
}
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
@@ -1,28 +1,28 @@
|
|
1
|
-
module GmoServices
|
2
|
-
module Payments
|
3
|
-
class Error
|
4
|
-
attr_accessor :response_body, :locale
|
5
|
-
|
6
|
-
ERROR_INFO_SEPARATOR = '|'.freeze
|
7
|
-
|
8
|
-
def initialize(response_body, locale = :en)
|
9
|
-
@response_body = response_body
|
10
|
-
@locale = locale
|
11
|
-
end
|
12
|
-
|
13
|
-
def call
|
14
|
-
error_info_array = response_body['ErrInfo'].split(ERROR_INFO_SEPARATOR)
|
15
|
-
error_message_array = error_info_array.map { |error_info| translate(error_info) }
|
16
|
-
error_message = error_message_array.join(ERROR_INFO_SEPARATOR)
|
17
|
-
response_body['ErrMessage'] = error_message
|
18
|
-
response_body
|
19
|
-
end
|
20
|
-
|
21
|
-
private
|
22
|
-
|
23
|
-
def translate(error_info)
|
24
|
-
I18n.t(error_info, locale: locale)
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
1
|
+
module GmoServices
|
2
|
+
module Payments
|
3
|
+
class Error
|
4
|
+
attr_accessor :response_body, :locale
|
5
|
+
|
6
|
+
ERROR_INFO_SEPARATOR = '|'.freeze
|
7
|
+
|
8
|
+
def initialize(response_body, locale = :en)
|
9
|
+
@response_body = response_body
|
10
|
+
@locale = locale
|
11
|
+
end
|
12
|
+
|
13
|
+
def call
|
14
|
+
error_info_array = response_body['ErrInfo'].split(ERROR_INFO_SEPARATOR)
|
15
|
+
error_message_array = error_info_array.map { |error_info| translate(error_info) }
|
16
|
+
error_message = error_message_array.join(ERROR_INFO_SEPARATOR)
|
17
|
+
response_body['ErrMessage'] = error_message
|
18
|
+
response_body
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def translate(error_info)
|
24
|
+
I18n.t(error_info, locale: locale)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -1,121 +1,121 @@
|
|
1
|
-
require 'gmo_services/payments/base'
|
2
|
-
|
3
|
-
module GmoServices
|
4
|
-
module Payments
|
5
|
-
class Member < Base
|
6
|
-
def register_member(params)
|
7
|
-
api_url = settings.register_member_api_url
|
8
|
-
params = initialize_params_of_register_member(params)
|
9
|
-
post_request(api_url, params)
|
10
|
-
end
|
11
|
-
|
12
|
-
def search_member(params)
|
13
|
-
api_url = settings.search_member_api_url
|
14
|
-
params = initialize_params_of_search_member(params)
|
15
|
-
post_request(api_url, params)
|
16
|
-
end
|
17
|
-
|
18
|
-
def update_member(params)
|
19
|
-
api_url = settings.update_member_api_url
|
20
|
-
params = initialize_params_of_update_member(params)
|
21
|
-
post_request(api_url, params)
|
22
|
-
end
|
23
|
-
|
24
|
-
def delete_member(params)
|
25
|
-
api_url = settings.delete_member_api_url
|
26
|
-
params = initialize_params_of_delete_member(params)
|
27
|
-
post_request(api_url, params)
|
28
|
-
end
|
29
|
-
|
30
|
-
def add_card_by_token(params)
|
31
|
-
api_url = settings.add_card_to_member_api_url
|
32
|
-
params = initialize_params_of_add_card_by_token(params)
|
33
|
-
post_request(api_url, params)
|
34
|
-
end
|
35
|
-
|
36
|
-
def search_card(params)
|
37
|
-
api_url = settings.search_card_api_url
|
38
|
-
params = initialize_params_of_search_card(params)
|
39
|
-
post_request(api_url, params)
|
40
|
-
end
|
41
|
-
|
42
|
-
def delete_card(params)
|
43
|
-
api_url = settings.delete_card_api_url
|
44
|
-
params = initialize_params_of_delete_card(params)
|
45
|
-
post_request(api_url, params)
|
46
|
-
end
|
47
|
-
|
48
|
-
private
|
49
|
-
|
50
|
-
def initialize_settings
|
51
|
-
Settings.payments.member
|
52
|
-
end
|
53
|
-
|
54
|
-
def initialize_params_of_register_member(params)
|
55
|
-
{
|
56
|
-
SiteID: site_id,
|
57
|
-
SitePass: site_pass,
|
58
|
-
MemberID: params[:member_id],
|
59
|
-
MemberName: params[:member_name]
|
60
|
-
}
|
61
|
-
end
|
62
|
-
|
63
|
-
def initialize_params_of_search_member(params)
|
64
|
-
{
|
65
|
-
SiteID: site_id,
|
66
|
-
SitePass: site_pass,
|
67
|
-
MemberID: params[:member_id]
|
68
|
-
}
|
69
|
-
end
|
70
|
-
|
71
|
-
def initialize_params_of_update_member(params)
|
72
|
-
{
|
73
|
-
SiteID: site_id,
|
74
|
-
SitePass: site_pass,
|
75
|
-
MemberID: params[:member_id],
|
76
|
-
MemberName: params[:member_name]
|
77
|
-
}
|
78
|
-
end
|
79
|
-
|
80
|
-
def initialize_params_of_delete_member(params)
|
81
|
-
{
|
82
|
-
SiteID: site_id,
|
83
|
-
SitePass: site_pass,
|
84
|
-
MemberID: params[:member_id]
|
85
|
-
}
|
86
|
-
end
|
87
|
-
|
88
|
-
def initialize_params_of_add_card_by_token(params)
|
89
|
-
{
|
90
|
-
SiteID: site_id,
|
91
|
-
SitePass: site_pass,
|
92
|
-
MemberID: params[:member_id],
|
93
|
-
SeqMode: params[:seq_mode],
|
94
|
-
Token: params[:token]
|
95
|
-
}
|
96
|
-
end
|
97
|
-
|
98
|
-
def initialize_params_of_search_card(params)
|
99
|
-
{
|
100
|
-
SiteID: site_id,
|
101
|
-
SitePass: site_pass,
|
102
|
-
MemberID: params[:member_id],
|
103
|
-
SeqMode: params[:seq_mode],
|
104
|
-
ValidFlag: params[:valid_flag],
|
105
|
-
CardSeq: params[:card_seq],
|
106
|
-
UseFloatingMask: params[:use_floating_mask]
|
107
|
-
}
|
108
|
-
end
|
109
|
-
|
110
|
-
def initialize_params_of_delete_card(params)
|
111
|
-
{
|
112
|
-
SiteID: site_id,
|
113
|
-
SitePass: site_pass,
|
114
|
-
MemberID: params[:member_id],
|
115
|
-
SeqMode: params[:seq_mode],
|
116
|
-
CardSeq: params[:card_seq]
|
117
|
-
}
|
118
|
-
end
|
119
|
-
end
|
120
|
-
end
|
121
|
-
end
|
1
|
+
require 'gmo_services/payments/base'
|
2
|
+
|
3
|
+
module GmoServices
|
4
|
+
module Payments
|
5
|
+
class Member < Base
|
6
|
+
def register_member(params)
|
7
|
+
api_url = settings.register_member_api_url
|
8
|
+
params = initialize_params_of_register_member(params)
|
9
|
+
post_request(api_url, params)
|
10
|
+
end
|
11
|
+
|
12
|
+
def search_member(params)
|
13
|
+
api_url = settings.search_member_api_url
|
14
|
+
params = initialize_params_of_search_member(params)
|
15
|
+
post_request(api_url, params)
|
16
|
+
end
|
17
|
+
|
18
|
+
def update_member(params)
|
19
|
+
api_url = settings.update_member_api_url
|
20
|
+
params = initialize_params_of_update_member(params)
|
21
|
+
post_request(api_url, params)
|
22
|
+
end
|
23
|
+
|
24
|
+
def delete_member(params)
|
25
|
+
api_url = settings.delete_member_api_url
|
26
|
+
params = initialize_params_of_delete_member(params)
|
27
|
+
post_request(api_url, params)
|
28
|
+
end
|
29
|
+
|
30
|
+
def add_card_by_token(params)
|
31
|
+
api_url = settings.add_card_to_member_api_url
|
32
|
+
params = initialize_params_of_add_card_by_token(params)
|
33
|
+
post_request(api_url, params)
|
34
|
+
end
|
35
|
+
|
36
|
+
def search_card(params)
|
37
|
+
api_url = settings.search_card_api_url
|
38
|
+
params = initialize_params_of_search_card(params)
|
39
|
+
post_request(api_url, params)
|
40
|
+
end
|
41
|
+
|
42
|
+
def delete_card(params)
|
43
|
+
api_url = settings.delete_card_api_url
|
44
|
+
params = initialize_params_of_delete_card(params)
|
45
|
+
post_request(api_url, params)
|
46
|
+
end
|
47
|
+
|
48
|
+
private
|
49
|
+
|
50
|
+
def initialize_settings
|
51
|
+
Settings.payments.member
|
52
|
+
end
|
53
|
+
|
54
|
+
def initialize_params_of_register_member(params)
|
55
|
+
{
|
56
|
+
SiteID: site_id,
|
57
|
+
SitePass: site_pass,
|
58
|
+
MemberID: params[:member_id],
|
59
|
+
MemberName: params[:member_name]
|
60
|
+
}
|
61
|
+
end
|
62
|
+
|
63
|
+
def initialize_params_of_search_member(params)
|
64
|
+
{
|
65
|
+
SiteID: site_id,
|
66
|
+
SitePass: site_pass,
|
67
|
+
MemberID: params[:member_id]
|
68
|
+
}
|
69
|
+
end
|
70
|
+
|
71
|
+
def initialize_params_of_update_member(params)
|
72
|
+
{
|
73
|
+
SiteID: site_id,
|
74
|
+
SitePass: site_pass,
|
75
|
+
MemberID: params[:member_id],
|
76
|
+
MemberName: params[:member_name]
|
77
|
+
}
|
78
|
+
end
|
79
|
+
|
80
|
+
def initialize_params_of_delete_member(params)
|
81
|
+
{
|
82
|
+
SiteID: site_id,
|
83
|
+
SitePass: site_pass,
|
84
|
+
MemberID: params[:member_id]
|
85
|
+
}
|
86
|
+
end
|
87
|
+
|
88
|
+
def initialize_params_of_add_card_by_token(params)
|
89
|
+
{
|
90
|
+
SiteID: site_id,
|
91
|
+
SitePass: site_pass,
|
92
|
+
MemberID: params[:member_id],
|
93
|
+
SeqMode: params[:seq_mode],
|
94
|
+
Token: params[:token]
|
95
|
+
}
|
96
|
+
end
|
97
|
+
|
98
|
+
def initialize_params_of_search_card(params)
|
99
|
+
{
|
100
|
+
SiteID: site_id,
|
101
|
+
SitePass: site_pass,
|
102
|
+
MemberID: params[:member_id],
|
103
|
+
SeqMode: params[:seq_mode],
|
104
|
+
ValidFlag: params[:valid_flag],
|
105
|
+
CardSeq: params[:card_seq],
|
106
|
+
UseFloatingMask: params[:use_floating_mask]
|
107
|
+
}
|
108
|
+
end
|
109
|
+
|
110
|
+
def initialize_params_of_delete_card(params)
|
111
|
+
{
|
112
|
+
SiteID: site_id,
|
113
|
+
SitePass: site_pass,
|
114
|
+
MemberID: params[:member_id],
|
115
|
+
SeqMode: params[:seq_mode],
|
116
|
+
CardSeq: params[:card_seq]
|
117
|
+
}
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
data/lib/gmo_services/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
module GmoServices
|
2
|
-
VERSION = '0.1.
|
3
|
-
end
|
1
|
+
module GmoServices
|
2
|
+
VERSION = '0.1.6'.freeze
|
3
|
+
end
|
data/lib/gmo_services.rb
CHANGED
@@ -1,17 +1,17 @@
|
|
1
|
-
require 'gmo_services/version'
|
2
|
-
require 'gmo_services/payments/card'
|
3
|
-
require 'gmo_services/payments/member'
|
4
|
-
require 'gmo_services/payments/error'
|
5
|
-
require 'net/http'
|
6
|
-
require 'rack/utils'
|
7
|
-
|
8
|
-
require 'i18n'
|
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
|
11
|
-
|
12
|
-
require 'config'
|
13
|
-
settings_file_path = File.join(File.dirname(__FILE__), 'config/settings.yml')
|
14
|
-
Config.load_and_set_settings(settings_file_path)
|
15
|
-
|
16
|
-
module GmoServices
|
17
|
-
end
|
1
|
+
require 'gmo_services/version'
|
2
|
+
require 'gmo_services/payments/card'
|
3
|
+
require 'gmo_services/payments/member'
|
4
|
+
require 'gmo_services/payments/error'
|
5
|
+
require 'net/http'
|
6
|
+
require 'rack/utils'
|
7
|
+
|
8
|
+
require 'i18n'
|
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
|
11
|
+
|
12
|
+
require 'config'
|
13
|
+
settings_file_path = File.join(File.dirname(__FILE__), 'config/settings.yml')
|
14
|
+
Config.load_and_set_settings(settings_file_path)
|
15
|
+
|
16
|
+
module GmoServices
|
17
|
+
end
|