gmo 0.2.5 → 0.5.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 +5 -5
- data/.travis.yml +10 -6
- data/CHANGELOG.md +42 -1
- data/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_cancel_deposit_gets_data_about_a_deposit.yml +38 -0
- data/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_cancel_mail_deposit_gets_data_about_a_mail_deposit.yml +38 -0
- data/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_create_account_gets_data_about_an_account.yml +38 -0
- data/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_create_deposit_gets_data_about_a_deposit.yml +38 -0
- data/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_create_mail_deposit_gets_data_about_a_mail_deposit.yml +38 -0
- data/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_delete_account_gets_data_about_an_account.yml +38 -0
- data/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_search_account_gets_data_about_an_account.yml +38 -0
- data/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_search_balance_gets_data_about_balance.yml +38 -0
- data/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_search_deposit_gets_data_about_a_deposit.yml +38 -0
- data/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_search_mail_deposit_gets_data_about_a_mail_deposit.yml +38 -0
- data/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_update_account_gets_data_about_an_account.yml +38 -0
- data/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_change_tran_brandtoken_gets_data_about_order.yml +108 -0
- data/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_cvs_cancel_gets_data_about_a_transaction.yml +63 -0
- data/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_brandtoken_gets_data_about_a_transaction.yml +38 -0
- data/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_linepay_gets_data_about_a_transaction.yml +36 -0
- data/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_brandtoken_gets_data_about_a_transaction.yml +73 -0
- data/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_brandtoken_parameter_contains_Japanese_characters_should_correctly_handle_Japanese.yml +73 -0
- data/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_doesn_t_require_card_info_if_token_is_present.yml +69 -0
- data/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_linepay_gets_data_about_a_transaction.yml +69 -0
- data/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_refund_tran_brandtoken_gets_data_about_a_transaction.yml +108 -0
- data/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_sales_tran_brandtoken_gets_data_about_a_transaction.yml +143 -0
- data/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_void_tran_brandtoken_gets_data_about_order.yml +108 -0
- data/fixtures/vcr_cassettes/GMO_Payment_ShopAndSiteAPI/_exec_tran_brandtoken_got_data.yml +73 -0
- data/fixtures/vcr_cassettes/GMO_Payment_ShopAndSiteAPI/_trade_brandtoken_got_data.yml +108 -0
- data/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_delete_brandtoken_gets_data_about_a_brandtoken.yml +73 -0
- data/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_save_card_doesn_t_require_card_info_if_token_is_present.yml +36 -0
- data/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_search_brandtoken_gets_data_about_a_brandtoken.yml +74 -0
- data/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_search_card_detail_by_member_id_gets_data_about_card_detail.yml +36 -0
- data/gmo.gemspec +1 -1
- data/lib/gmo.rb +6 -1
- data/lib/gmo/const.rb +2500 -3
- data/lib/gmo/errors.rb +22 -4
- data/lib/gmo/http_services.rb +5 -5
- data/lib/gmo/remittance_api.rb +331 -0
- data/lib/gmo/shop_and_site_api.rb +79 -5
- data/lib/gmo/shop_api.rb +262 -10
- data/lib/gmo/site_api.rb +77 -7
- data/lib/gmo/version.rb +2 -2
- data/spec/gmo/{error_spec.rb → errors_spec.rb} +11 -2
- data/spec/gmo/remittance_api_spec.rb +506 -0
- data/spec/gmo/shop_and_site_api_spec.rb +87 -7
- data/spec/gmo/shop_api_spec.rb +464 -109
- data/spec/gmo/site_api_spec.rb +120 -23
- data/spec/support/config.example.yml +8 -1
- data/spec/support/config.yml +8 -1
- data/spec/support/config_loader.rb +1 -1
- data/spec/support/vcr.rb +12 -3
- metadata +40 -11
|
@@ -8,17 +8,23 @@ describe "GMO::Payment::ShopAndSiteAPI" do
|
|
|
8
8
|
:shop_pass => SPEC_CONF["shop_pass"],
|
|
9
9
|
:site_id => SPEC_CONF["site_id"],
|
|
10
10
|
:site_pass => SPEC_CONF["site_pass"],
|
|
11
|
-
:host => SPEC_CONF["host"]
|
|
11
|
+
:host => SPEC_CONF["host"],
|
|
12
|
+
:locale => :ja
|
|
13
|
+
|
|
12
14
|
})
|
|
13
15
|
@shop_api ||= GMO::Payment::ShopAPI.new({
|
|
14
16
|
:shop_id => SPEC_CONF["shop_id"],
|
|
15
17
|
:shop_pass => SPEC_CONF["shop_pass"],
|
|
16
|
-
:host => SPEC_CONF["host"]
|
|
18
|
+
:host => SPEC_CONF["host"],
|
|
19
|
+
:locale => :ja
|
|
20
|
+
|
|
17
21
|
})
|
|
18
22
|
@site_api ||= GMO::Payment::SiteAPI.new({
|
|
19
23
|
:site_id => SPEC_CONF["site_id"],
|
|
20
24
|
:site_pass => SPEC_CONF["site_pass"],
|
|
21
|
-
:host => SPEC_CONF["host"]
|
|
25
|
+
:host => SPEC_CONF["host"],
|
|
26
|
+
:locale => :ja
|
|
27
|
+
|
|
22
28
|
})
|
|
23
29
|
end
|
|
24
30
|
|
|
@@ -79,9 +85,9 @@ describe "GMO::Payment::ShopAndSiteAPI" do
|
|
|
79
85
|
:order_id => order_id,
|
|
80
86
|
:member_id => member_id
|
|
81
87
|
})
|
|
82
|
-
result["CardSeq"].nil?.should_not
|
|
83
|
-
result["CardNo"].nil?.should_not
|
|
84
|
-
result["Forward"].nil?.should_not
|
|
88
|
+
result["CardSeq"].nil?.should_not be_truthy
|
|
89
|
+
result["CardNo"].nil?.should_not be_truthy
|
|
90
|
+
result["Forward"].nil?.should_not be_truthy
|
|
85
91
|
end
|
|
86
92
|
|
|
87
93
|
it "got error if missing options", :vcr do
|
|
@@ -91,4 +97,78 @@ describe "GMO::Payment::ShopAndSiteAPI" do
|
|
|
91
97
|
end
|
|
92
98
|
end
|
|
93
99
|
|
|
94
|
-
|
|
100
|
+
describe "#trade_brandtoken" do
|
|
101
|
+
|
|
102
|
+
it "got data", :vcr do
|
|
103
|
+
order_id = generate_id
|
|
104
|
+
result = @shop_api.entry_tran_brandtoken({
|
|
105
|
+
:order_id => order_id,
|
|
106
|
+
:job_cd => "AUTH",
|
|
107
|
+
:amount => 100
|
|
108
|
+
})
|
|
109
|
+
access_id = result["AccessID"]
|
|
110
|
+
access_pass = result["AccessPass"]
|
|
111
|
+
member_id = generate_id
|
|
112
|
+
result = @service.exec_tran_brandtoken({
|
|
113
|
+
:order_id => order_id,
|
|
114
|
+
:access_id => access_id,
|
|
115
|
+
:access_pass => access_pass,
|
|
116
|
+
:token_type => :apple_pay,
|
|
117
|
+
:token => 'base64encodedtoken',
|
|
118
|
+
:member_id => member_id
|
|
119
|
+
})
|
|
120
|
+
result = @service.trade_brandtoken({
|
|
121
|
+
:order_id => order_id,
|
|
122
|
+
:member_id => member_id
|
|
123
|
+
})
|
|
124
|
+
result["TokenSeq"].nil?.should_not be true
|
|
125
|
+
result["CardNoToken"].nil?.should_not be true
|
|
126
|
+
result["Forward"].nil?.should_not be true
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
it "got error if missing options", :vcr do
|
|
130
|
+
lambda {
|
|
131
|
+
result = @service.trade_brandtoken()
|
|
132
|
+
}.should raise_error('Required order_id, member_id were not provided.')
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
describe "#exec_tran_brandtoken" do
|
|
137
|
+
|
|
138
|
+
it "got data", :vcr do
|
|
139
|
+
order_id = generate_id
|
|
140
|
+
result = @shop_api.entry_tran_brandtoken({
|
|
141
|
+
:order_id => order_id,
|
|
142
|
+
:job_cd => "AUTH",
|
|
143
|
+
:amount => 100
|
|
144
|
+
})
|
|
145
|
+
access_id = result["AccessID"]
|
|
146
|
+
access_pass = result["AccessPass"]
|
|
147
|
+
member_id = generate_id
|
|
148
|
+
result = @service.exec_tran_brandtoken({
|
|
149
|
+
:order_id => order_id,
|
|
150
|
+
:access_id => access_id,
|
|
151
|
+
:access_pass => access_pass,
|
|
152
|
+
:token_type => :apple_pay,
|
|
153
|
+
:token => 'base64encodedtoken',
|
|
154
|
+
:member_id => member_id
|
|
155
|
+
})
|
|
156
|
+
result["Status"].nil?.should_not be true
|
|
157
|
+
result["OrderID"].nil?.should_not be true
|
|
158
|
+
result["Forward"].nil?.should_not be true
|
|
159
|
+
result["Approve"].nil?.should_not be true
|
|
160
|
+
result["TranID"].nil?.should_not be true
|
|
161
|
+
result["TranDate"].nil?.should_not be true
|
|
162
|
+
result["ClientField1"].nil?.should_not be true
|
|
163
|
+
result["ClientField2"].nil?.should_not be true
|
|
164
|
+
result["ClientField3"].nil?.should_not be true
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
it "got error if missing options", :vcr do
|
|
168
|
+
lambda {
|
|
169
|
+
result = @service.exec_tran_brandtoken()
|
|
170
|
+
}.should raise_error('Required access_id, access_pass, member_id, order_id were not provided.')
|
|
171
|
+
end
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
end
|
data/spec/gmo/shop_api_spec.rb
CHANGED
|
@@ -9,10 +9,19 @@ describe "GMO::Payment::ShopAPI" do
|
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
before(:each) do
|
|
12
|
+
@shop_site ||= GMO::Payment::ShopAndSiteAPI.new({
|
|
13
|
+
:site_id => SPEC_CONF["site_id"],
|
|
14
|
+
:site_pass => SPEC_CONF["site_pass"],
|
|
15
|
+
:shop_id => SPEC_CONF["shop_id"],
|
|
16
|
+
:shop_pass => SPEC_CONF["shop_pass"],
|
|
17
|
+
:host => SPEC_CONF["host"],
|
|
18
|
+
:locale => :ja
|
|
19
|
+
})
|
|
12
20
|
@service ||= GMO::Payment::ShopAPI.new({
|
|
13
21
|
:shop_id => SPEC_CONF["shop_id"],
|
|
14
22
|
:shop_pass => SPEC_CONF["shop_pass"],
|
|
15
|
-
:host => SPEC_CONF["host"]
|
|
23
|
+
:host => SPEC_CONF["host"],
|
|
24
|
+
:locale => :ja
|
|
16
25
|
})
|
|
17
26
|
end
|
|
18
27
|
|
|
@@ -42,8 +51,8 @@ describe "GMO::Payment::ShopAPI" do
|
|
|
42
51
|
:job_cd => "AUTH",
|
|
43
52
|
:amount => 100
|
|
44
53
|
})
|
|
45
|
-
result["AccessID"].nil?.should_not
|
|
46
|
-
result["AccessPass"].nil?.should_not
|
|
54
|
+
result["AccessID"].nil?.should_not be_truthy
|
|
55
|
+
result["AccessPass"].nil?.should_not be_truthy
|
|
47
56
|
end
|
|
48
57
|
|
|
49
58
|
it "got error if missing options", :vcr do
|
|
@@ -60,8 +69,8 @@ describe "GMO::Payment::ShopAPI" do
|
|
|
60
69
|
:order_id => order_id,
|
|
61
70
|
:amount => 100
|
|
62
71
|
})
|
|
63
|
-
result["AccessID"].nil?.should_not
|
|
64
|
-
result["AccessPass"].nil?.should_not
|
|
72
|
+
result["AccessID"].nil?.should_not be_truthy
|
|
73
|
+
result["AccessPass"].nil?.should_not be_truthy
|
|
65
74
|
end
|
|
66
75
|
|
|
67
76
|
it "got error if missing options", :vcr do
|
|
@@ -78,8 +87,8 @@ describe "GMO::Payment::ShopAPI" do
|
|
|
78
87
|
:order_id => order_id,
|
|
79
88
|
:amount => 100
|
|
80
89
|
})
|
|
81
|
-
result["AccessID"].nil?.should_not
|
|
82
|
-
result["AccessPass"].nil?.should_not
|
|
90
|
+
result["AccessID"].nil?.should_not be_truthy
|
|
91
|
+
result["AccessPass"].nil?.should_not be_truthy
|
|
83
92
|
end
|
|
84
93
|
|
|
85
94
|
it "got error if missing options", :vcr do
|
|
@@ -89,6 +98,44 @@ describe "GMO::Payment::ShopAPI" do
|
|
|
89
98
|
end
|
|
90
99
|
end
|
|
91
100
|
|
|
101
|
+
describe "#entry_tran_linepay" do
|
|
102
|
+
it "gets data about a transaction", :vcr do
|
|
103
|
+
order_id = @order_id
|
|
104
|
+
result = @service.entry_tran_linepay({
|
|
105
|
+
:order_id => order_id,
|
|
106
|
+
:job_cd => 'CAPTURE',
|
|
107
|
+
:amount => 100
|
|
108
|
+
})
|
|
109
|
+
result["AccessID"].nil?.should_not be_truthy
|
|
110
|
+
result["AccessPass"].nil?.should_not be_truthy
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
it "got error if missing options", :vcr do
|
|
114
|
+
lambda {
|
|
115
|
+
result = @service.entry_tran_linepay()
|
|
116
|
+
}.should raise_error("Required order_id, job_cd, amount were not provided.")
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
describe "#entry_tran_brandtoken" do
|
|
121
|
+
it "gets data about a transaction", :vcr do
|
|
122
|
+
order_id = @order_id
|
|
123
|
+
result = @service.entry_tran_brandtoken({
|
|
124
|
+
:order_id => order_id,
|
|
125
|
+
:job_cd => "AUTH",
|
|
126
|
+
:amount => 100
|
|
127
|
+
})
|
|
128
|
+
result["AccessID"].nil?.should_not be true
|
|
129
|
+
result["AccessPass"].nil?.should_not be true
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
it "got error if missing options", :vcr do
|
|
133
|
+
lambda {
|
|
134
|
+
result = @service.entry_tran_brandtoken()
|
|
135
|
+
}.should raise_error('Required order_id, job_cd, amount were not provided.')
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
|
|
92
139
|
describe "#exec_tran" do
|
|
93
140
|
it "gets data about a transaction", :vcr do
|
|
94
141
|
order_id = generate_id
|
|
@@ -110,18 +157,18 @@ describe "GMO::Payment::ShopAPI" do
|
|
|
110
157
|
:expire => "1405",
|
|
111
158
|
:client_field_1 => client_field_1
|
|
112
159
|
})
|
|
113
|
-
result["ACS"].nil?.should_not
|
|
114
|
-
result["OrderID"].nil?.should_not
|
|
115
|
-
result["Forward"].nil?.should_not
|
|
116
|
-
result["Method"].nil?.should_not
|
|
117
|
-
result["PayTimes"].nil?.should_not
|
|
118
|
-
result["Approve"].nil?.should_not
|
|
119
|
-
result["TranID"].nil?.should_not
|
|
120
|
-
result["TranDate"].nil?.should_not
|
|
121
|
-
result["CheckString"].nil?.should_not
|
|
122
|
-
result["ClientField1"].nil?.should_not
|
|
123
|
-
(result["ClientField1"] == client_field_1).should
|
|
124
|
-
result["ClientField3"].nil?.should_not
|
|
160
|
+
result["ACS"].nil?.should_not be_truthy
|
|
161
|
+
result["OrderID"].nil?.should_not be_truthy
|
|
162
|
+
result["Forward"].nil?.should_not be_truthy
|
|
163
|
+
result["Method"].nil?.should_not be_truthy
|
|
164
|
+
result["PayTimes"].nil?.should_not be_truthy
|
|
165
|
+
result["Approve"].nil?.should_not be_truthy
|
|
166
|
+
result["TranID"].nil?.should_not be_truthy
|
|
167
|
+
result["TranDate"].nil?.should_not be_truthy
|
|
168
|
+
result["CheckString"].nil?.should_not be_truthy
|
|
169
|
+
result["ClientField1"].nil?.should_not be_truthy
|
|
170
|
+
(result["ClientField1"] == client_field_1).should be_truthy
|
|
171
|
+
result["ClientField3"].nil?.should_not be_truthy
|
|
125
172
|
end
|
|
126
173
|
|
|
127
174
|
it "got error if missing options", :vcr do
|
|
@@ -130,6 +177,27 @@ describe "GMO::Payment::ShopAPI" do
|
|
|
130
177
|
}.should raise_error("Required access_id, access_pass, order_id, card_no, expire were not provided.")
|
|
131
178
|
end
|
|
132
179
|
|
|
180
|
+
it "doesn't require card info if token is present", :vcr do
|
|
181
|
+
lambda {
|
|
182
|
+
order_id = generate_id
|
|
183
|
+
result = @service.entry_tran({
|
|
184
|
+
:order_id => order_id,
|
|
185
|
+
:job_cd => "AUTH",
|
|
186
|
+
:amount => 100
|
|
187
|
+
})
|
|
188
|
+
access_id = result["AccessID"]
|
|
189
|
+
access_pass = result["AccessPass"]
|
|
190
|
+
result = @service.exec_tran({
|
|
191
|
+
:order_id => order_id,
|
|
192
|
+
:access_id => access_id,
|
|
193
|
+
:access_pass => access_pass,
|
|
194
|
+
:method => 1,
|
|
195
|
+
:pay_times => 1,
|
|
196
|
+
:token => "onetimetokenfromgmo"
|
|
197
|
+
})
|
|
198
|
+
}.should_not raise_error("Required card_no, expire were not provided.")
|
|
199
|
+
end
|
|
200
|
+
|
|
133
201
|
context "parameter contains Japanese characters" do
|
|
134
202
|
before { require "kconv" unless defined?(Kconv) }
|
|
135
203
|
|
|
@@ -153,19 +221,19 @@ describe "GMO::Payment::ShopAPI" do
|
|
|
153
221
|
:expire => "1405",
|
|
154
222
|
:client_field_1 => client_field_1
|
|
155
223
|
})
|
|
156
|
-
result["ACS"].nil?.should_not
|
|
157
|
-
result["OrderID"].nil?.should_not
|
|
158
|
-
result["Forward"].nil?.should_not
|
|
159
|
-
result["Method"].nil?.should_not
|
|
160
|
-
result["PayTimes"].nil?.should_not
|
|
161
|
-
result["Approve"].nil?.should_not
|
|
162
|
-
result["TranID"].nil?.should_not
|
|
163
|
-
result["TranDate"].nil?.should_not
|
|
164
|
-
result["CheckString"].nil?.should_not
|
|
165
|
-
result["ClientField1"].nil?.should_not
|
|
166
|
-
(result["ClientField1"] == client_field_1).should
|
|
167
|
-
(result["ClientField1"].encoding.to_s == "UTF-8").should
|
|
168
|
-
result["ClientField3"].nil?.should_not
|
|
224
|
+
result["ACS"].nil?.should_not be_truthy
|
|
225
|
+
result["OrderID"].nil?.should_not be_truthy
|
|
226
|
+
result["Forward"].nil?.should_not be_truthy
|
|
227
|
+
result["Method"].nil?.should_not be_truthy
|
|
228
|
+
result["PayTimes"].nil?.should_not be_truthy
|
|
229
|
+
result["Approve"].nil?.should_not be_truthy
|
|
230
|
+
result["TranID"].nil?.should_not be_truthy
|
|
231
|
+
result["TranDate"].nil?.should_not be_truthy
|
|
232
|
+
result["CheckString"].nil?.should_not be_truthy
|
|
233
|
+
result["ClientField1"].nil?.should_not be_truthy
|
|
234
|
+
(result["ClientField1"] == client_field_1).should be_truthy
|
|
235
|
+
(result["ClientField1"].encoding.to_s == "UTF-8").should be_truthy
|
|
236
|
+
result["ClientField3"].nil?.should_not be_truthy
|
|
169
237
|
end
|
|
170
238
|
end
|
|
171
239
|
end
|
|
@@ -193,22 +261,22 @@ describe "GMO::Payment::ShopAPI" do
|
|
|
193
261
|
:receipts_disp_13 => '00:00-00:15',
|
|
194
262
|
:client_field_1 => client_field_1
|
|
195
263
|
})
|
|
196
|
-
result["OrderID"].nil?.should_not
|
|
197
|
-
result["Convenience"].nil?.should_not
|
|
198
|
-
result["ConfNo"].nil?.should_not
|
|
199
|
-
result["ReceiptNo"].nil?.should_not
|
|
200
|
-
result["PaymentTerm"].nil?.should_not
|
|
201
|
-
result["TranDate"].nil?.should_not
|
|
202
|
-
result["CheckString"].nil?.should_not
|
|
203
|
-
result["ClientField1"].nil?.should_not
|
|
204
|
-
(result["ClientField1"] == client_field_1).should
|
|
205
|
-
result["ClientField3"].nil?.should_not
|
|
264
|
+
result["OrderID"].nil?.should_not be_truthy
|
|
265
|
+
result["Convenience"].nil?.should_not be_truthy
|
|
266
|
+
result["ConfNo"].nil?.should_not be_truthy
|
|
267
|
+
result["ReceiptNo"].nil?.should_not be_truthy
|
|
268
|
+
result["PaymentTerm"].nil?.should_not be_truthy
|
|
269
|
+
result["TranDate"].nil?.should_not be_truthy
|
|
270
|
+
result["CheckString"].nil?.should_not be_truthy
|
|
271
|
+
result["ClientField1"].nil?.should_not be_truthy
|
|
272
|
+
(result["ClientField1"] == client_field_1).should be_truthy
|
|
273
|
+
result["ClientField3"].nil?.should_not be_truthy
|
|
206
274
|
end
|
|
207
275
|
|
|
208
276
|
it "got error if missing options", :vcr do
|
|
209
277
|
lambda {
|
|
210
278
|
result = @service.exec_tran_cvs()
|
|
211
|
-
}.should raise_error("Required access_id, access_pass, order_id, convenience, customer_name, tel_no, receipts_disp_11, receipts_disp_12, receipts_disp_13 were not provided.")
|
|
279
|
+
}.should raise_error(ArgumentError, "Required access_id, access_pass, order_id, convenience, customer_name, customer_kana, tel_no, receipts_disp_11, receipts_disp_12, receipts_disp_13 were not provided.")
|
|
212
280
|
end
|
|
213
281
|
end
|
|
214
282
|
|
|
@@ -232,14 +300,14 @@ describe "GMO::Payment::ShopAPI" do
|
|
|
232
300
|
:receipts_disp_12 => '0300000001',
|
|
233
301
|
:receipts_disp_13 => '00:00-00:15'
|
|
234
302
|
})
|
|
235
|
-
result["OrderID"].nil?.should_not
|
|
236
|
-
result["CustID"].nil?.should_not
|
|
237
|
-
result["BkCode"].nil?.should_not
|
|
238
|
-
result["ConfNo"].nil?.should_not
|
|
239
|
-
result["EncryptReceiptNo"].nil?.should_not
|
|
240
|
-
result["PaymentTerm"].nil?.should_not
|
|
241
|
-
result["TranDate"].nil?.should_not
|
|
242
|
-
result["CheckString"].nil?.should_not
|
|
303
|
+
result["OrderID"].nil?.should_not be_truthy
|
|
304
|
+
result["CustID"].nil?.should_not be_truthy
|
|
305
|
+
result["BkCode"].nil?.should_not be_truthy
|
|
306
|
+
result["ConfNo"].nil?.should_not be_truthy
|
|
307
|
+
result["EncryptReceiptNo"].nil?.should_not be_truthy
|
|
308
|
+
result["PaymentTerm"].nil?.should_not be_truthy
|
|
309
|
+
result["TranDate"].nil?.should_not be_truthy
|
|
310
|
+
result["CheckString"].nil?.should_not be_truthy
|
|
243
311
|
end
|
|
244
312
|
|
|
245
313
|
it "got error if missing options", :vcr do
|
|
@@ -249,6 +317,108 @@ describe "GMO::Payment::ShopAPI" do
|
|
|
249
317
|
end
|
|
250
318
|
end
|
|
251
319
|
|
|
320
|
+
describe "#exec_tran_linepay" do
|
|
321
|
+
it "gets data about a transaction", :vcr do
|
|
322
|
+
order_id = generate_id
|
|
323
|
+
result = @service.entry_tran_linepay({
|
|
324
|
+
:order_id => order_id,
|
|
325
|
+
:job_cd => 'CAPTURE',
|
|
326
|
+
:amount => 100
|
|
327
|
+
})
|
|
328
|
+
access_id = result["AccessID"]
|
|
329
|
+
access_pass = result["AccessPass"]
|
|
330
|
+
result = @service.exec_tran_linepay({
|
|
331
|
+
:order_id => order_id,
|
|
332
|
+
:access_id => access_id,
|
|
333
|
+
:access_pass => access_pass,
|
|
334
|
+
:ret_url => 'https://example.com/path/to/return/success',
|
|
335
|
+
:error_rcv_url => 'https://example.com/path/to/return/failure',
|
|
336
|
+
:product_name => '購入する商品名'
|
|
337
|
+
})
|
|
338
|
+
result["Start"].nil?.should_not be_truthy
|
|
339
|
+
result["AccessID"].nil?.should_not be_truthy
|
|
340
|
+
result["Token"].nil?.should_not be_truthy
|
|
341
|
+
result["StartURL"].nil?.should_not be_truthy
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
it "got error if missing options", :vcr do
|
|
345
|
+
lambda {
|
|
346
|
+
result = @service.exec_tran_linepay()
|
|
347
|
+
}.should raise_error("Required access_id, access_pass, order_id, ret_url, error_rcv_url, product_name were not provided.")
|
|
348
|
+
end
|
|
349
|
+
end
|
|
350
|
+
|
|
351
|
+
describe "#exec_tran_brandtoken" do
|
|
352
|
+
it "gets data about a transaction", :vcr do
|
|
353
|
+
order_id = generate_id
|
|
354
|
+
client_field_1 = "client_field1"
|
|
355
|
+
result = @service.entry_tran_brandtoken({
|
|
356
|
+
:order_id => order_id,
|
|
357
|
+
:job_cd => "AUTH",
|
|
358
|
+
:amount => 100
|
|
359
|
+
})
|
|
360
|
+
access_id = result["AccessID"]
|
|
361
|
+
access_pass = result["AccessPass"]
|
|
362
|
+
result = @service.exec_tran_brandtoken({
|
|
363
|
+
:order_id => order_id,
|
|
364
|
+
:access_id => access_id,
|
|
365
|
+
:access_pass => access_pass,
|
|
366
|
+
:token_type => :apple_pay,
|
|
367
|
+
:token => 'base64encodedtoken',
|
|
368
|
+
:client_field_1 => client_field_1
|
|
369
|
+
})
|
|
370
|
+
result["Status"].nil?.should_not be true
|
|
371
|
+
result["OrderID"].nil?.should_not be true
|
|
372
|
+
result["Forward"].nil?.should_not be true
|
|
373
|
+
result["Approve"].nil?.should_not be true
|
|
374
|
+
result["TranID"].nil?.should_not be true
|
|
375
|
+
result["TranDate"].nil?.should_not be true
|
|
376
|
+
(result["ClientField1"] == client_field_1).should be true
|
|
377
|
+
result["ClientField2"].nil?.should_not be true
|
|
378
|
+
result["ClientField3"].nil?.should_not be true
|
|
379
|
+
end
|
|
380
|
+
|
|
381
|
+
it "got error if missing options", :vcr do
|
|
382
|
+
lambda {
|
|
383
|
+
result = @service.exec_tran_brandtoken()
|
|
384
|
+
}.should raise_error("Required access_id, access_pass, order_id were not provided.")
|
|
385
|
+
end
|
|
386
|
+
|
|
387
|
+
context "parameter contains Japanese characters" do
|
|
388
|
+
before { require "kconv" unless defined?(Kconv) }
|
|
389
|
+
|
|
390
|
+
it "should correctly handle Japanese", :vcr do
|
|
391
|
+
order_id = generate_id
|
|
392
|
+
client_field_1 = "〜−¢£¬−‖①ほげほげhogehoge"
|
|
393
|
+
result = @service.entry_tran_brandtoken({
|
|
394
|
+
:order_id => order_id,
|
|
395
|
+
:job_cd => "AUTH",
|
|
396
|
+
:amount => 100
|
|
397
|
+
})
|
|
398
|
+
access_id = result["AccessID"]
|
|
399
|
+
access_pass = result["AccessPass"]
|
|
400
|
+
result = @service.exec_tran_brandtoken({
|
|
401
|
+
:order_id => order_id,
|
|
402
|
+
:access_id => access_id,
|
|
403
|
+
:access_pass => access_pass,
|
|
404
|
+
:token_type => :apple_pay,
|
|
405
|
+
:token => 'base64encodedtoken',
|
|
406
|
+
:client_field_1 => client_field_1
|
|
407
|
+
})
|
|
408
|
+
result["Status"].nil?.should_not be true
|
|
409
|
+
result["OrderID"].nil?.should_not be true
|
|
410
|
+
result["Forward"].nil?.should_not be true
|
|
411
|
+
result["Approve"].nil?.should_not be true
|
|
412
|
+
result["TranID"].nil?.should_not be true
|
|
413
|
+
result["TranDate"].nil?.should_not be true
|
|
414
|
+
(result["ClientField1"] == client_field_1).should be true
|
|
415
|
+
(result["ClientField1"].encoding.to_s == "UTF-8").should be true
|
|
416
|
+
result["ClientField2"].nil?.should_not be true
|
|
417
|
+
result["ClientField3"].nil?.should_not be true
|
|
418
|
+
end
|
|
419
|
+
end
|
|
420
|
+
end
|
|
421
|
+
|
|
252
422
|
describe "#alter_tran" do
|
|
253
423
|
it "gets data about order", :vcr do
|
|
254
424
|
order_id = generate_id
|
|
@@ -274,13 +444,13 @@ describe "GMO::Payment::ShopAPI" do
|
|
|
274
444
|
:job_cd => "RETURN",
|
|
275
445
|
:amount => 100
|
|
276
446
|
})
|
|
277
|
-
result["AccessID"].nil?.should_not
|
|
278
|
-
result["AccessPass"].nil?.should_not
|
|
279
|
-
result["Forward"].nil?.should_not
|
|
280
|
-
result["Approve"].nil?.should_not
|
|
281
|
-
result["AccessPass"].nil?.should_not
|
|
282
|
-
result["TranID"].nil?.should_not
|
|
283
|
-
result["TranDate"].nil?.should_not
|
|
447
|
+
result["AccessID"].nil?.should_not be_truthy
|
|
448
|
+
result["AccessPass"].nil?.should_not be_truthy
|
|
449
|
+
result["Forward"].nil?.should_not be_truthy
|
|
450
|
+
result["Approve"].nil?.should_not be_truthy
|
|
451
|
+
result["AccessPass"].nil?.should_not be_truthy
|
|
452
|
+
result["TranID"].nil?.should_not be_truthy
|
|
453
|
+
result["TranDate"].nil?.should_not be_truthy
|
|
284
454
|
end
|
|
285
455
|
|
|
286
456
|
it "change order auth to sale", :vcr do
|
|
@@ -307,13 +477,13 @@ describe "GMO::Payment::ShopAPI" do
|
|
|
307
477
|
:job_cd => "SALES",
|
|
308
478
|
:amount => 100
|
|
309
479
|
})
|
|
310
|
-
result["AccessID"].nil?.should_not
|
|
311
|
-
result["AccessPass"].nil?.should_not
|
|
312
|
-
result["Forward"].nil?.should_not
|
|
313
|
-
result["Approve"].nil?.should_not
|
|
314
|
-
result["AccessPass"].nil?.should_not
|
|
315
|
-
result["TranID"].nil?.should_not
|
|
316
|
-
result["TranDate"].nil?.should_not
|
|
480
|
+
result["AccessID"].nil?.should_not be_truthy
|
|
481
|
+
result["AccessPass"].nil?.should_not be_truthy
|
|
482
|
+
result["Forward"].nil?.should_not be_truthy
|
|
483
|
+
result["Approve"].nil?.should_not be_truthy
|
|
484
|
+
result["AccessPass"].nil?.should_not be_truthy
|
|
485
|
+
result["TranID"].nil?.should_not be_truthy
|
|
486
|
+
result["TranDate"].nil?.should_not be_truthy
|
|
317
487
|
end
|
|
318
488
|
|
|
319
489
|
it "got error if missing options", :vcr do
|
|
@@ -348,12 +518,12 @@ describe "GMO::Payment::ShopAPI" do
|
|
|
348
518
|
:job_cd => "AUTH",
|
|
349
519
|
:amount => 1000
|
|
350
520
|
})
|
|
351
|
-
result["AccessID"].nil?.should_not
|
|
352
|
-
result["AccessPass"].nil?.should_not
|
|
353
|
-
result["Forward"].nil?.should_not
|
|
354
|
-
result["Approve"].nil?.should_not
|
|
355
|
-
result["TranID"].nil?.should_not
|
|
356
|
-
result["TranDate"].nil?.should_not
|
|
521
|
+
result["AccessID"].nil?.should_not be_truthy
|
|
522
|
+
result["AccessPass"].nil?.should_not be_truthy
|
|
523
|
+
result["Forward"].nil?.should_not be_truthy
|
|
524
|
+
result["Approve"].nil?.should_not be_truthy
|
|
525
|
+
result["TranID"].nil?.should_not be_truthy
|
|
526
|
+
result["TranDate"].nil?.should_not be_truthy
|
|
357
527
|
end
|
|
358
528
|
|
|
359
529
|
it "got error if missing options", :vcr do
|
|
@@ -363,6 +533,192 @@ describe "GMO::Payment::ShopAPI" do
|
|
|
363
533
|
end
|
|
364
534
|
end
|
|
365
535
|
|
|
536
|
+
describe "#change_tran_brandtoken" do
|
|
537
|
+
it "gets data about order", :vcr do
|
|
538
|
+
order_id = generate_id
|
|
539
|
+
result = @service.entry_tran_brandtoken({
|
|
540
|
+
:order_id => order_id,
|
|
541
|
+
:job_cd => "AUTH",
|
|
542
|
+
:amount => 100
|
|
543
|
+
})
|
|
544
|
+
access_id = result["AccessID"]
|
|
545
|
+
access_pass = result["AccessPass"]
|
|
546
|
+
@service.exec_tran_brandtoken({
|
|
547
|
+
:order_id => order_id,
|
|
548
|
+
:access_id => access_id,
|
|
549
|
+
:access_pass => access_pass,
|
|
550
|
+
:token_type => :apple_pay,
|
|
551
|
+
:token => 'base64encodedtoken'
|
|
552
|
+
})
|
|
553
|
+
result = @service.change_tran_brandtoken({
|
|
554
|
+
:order_id => order_id,
|
|
555
|
+
:access_id => access_id,
|
|
556
|
+
:access_pass => access_pass,
|
|
557
|
+
:job_cd => "CAPTURE",
|
|
558
|
+
:amount => 1500
|
|
559
|
+
})
|
|
560
|
+
result["AccessID"].nil?.should_not be true
|
|
561
|
+
result["AccessPass"].nil?.should_not be true
|
|
562
|
+
result["Status"].nil?.should_not be true
|
|
563
|
+
result["Forward"].nil?.should_not be true
|
|
564
|
+
result["Approve"].nil?.should_not be true
|
|
565
|
+
result["TranID"].nil?.should_not be true
|
|
566
|
+
result["TranDate"].nil?.should_not be true
|
|
567
|
+
end
|
|
568
|
+
|
|
569
|
+
it "got error if missing options", :vcr do
|
|
570
|
+
lambda {
|
|
571
|
+
result = @service.change_tran_brandtoken()
|
|
572
|
+
}.should raise_error('Required access_id, access_pass, order_id, job_cd, amount were not provided.')
|
|
573
|
+
end
|
|
574
|
+
end
|
|
575
|
+
|
|
576
|
+
describe "#void_tran_brandtoken" do
|
|
577
|
+
it "gets data about order", :vcr do
|
|
578
|
+
order_id = generate_id
|
|
579
|
+
result = @service.entry_tran_brandtoken({
|
|
580
|
+
:order_id => order_id,
|
|
581
|
+
:job_cd => "AUTH",
|
|
582
|
+
:amount => 100
|
|
583
|
+
})
|
|
584
|
+
access_id = result["AccessID"]
|
|
585
|
+
access_pass = result["AccessPass"]
|
|
586
|
+
@service.exec_tran_brandtoken({
|
|
587
|
+
:order_id => order_id,
|
|
588
|
+
:access_id => access_id,
|
|
589
|
+
:access_pass => access_pass,
|
|
590
|
+
:token_type => :apple_pay,
|
|
591
|
+
:token => 'base64encodedtoken'
|
|
592
|
+
})
|
|
593
|
+
result = @service.void_tran_brandtoken({
|
|
594
|
+
:order_id => order_id,
|
|
595
|
+
:access_id => access_id,
|
|
596
|
+
:access_pass => access_pass
|
|
597
|
+
})
|
|
598
|
+
result["AccessID"].nil?.should_not be true
|
|
599
|
+
result["AccessPass"].nil?.should_not be true
|
|
600
|
+
result["Status"].nil?.should_not be true
|
|
601
|
+
result["Forward"].nil?.should_not be true
|
|
602
|
+
result["Approve"].nil?.should_not be true
|
|
603
|
+
result["TranID"].nil?.should_not be true
|
|
604
|
+
result["TranDate"].nil?.should_not be true
|
|
605
|
+
end
|
|
606
|
+
|
|
607
|
+
it "got error if missing options", :vcr do
|
|
608
|
+
lambda {
|
|
609
|
+
result = @service.void_tran_brandtoken()
|
|
610
|
+
}.should raise_error('Required access_id, access_pass, order_id were not provided.')
|
|
611
|
+
end
|
|
612
|
+
end
|
|
613
|
+
|
|
614
|
+
describe "#sales_tran_brandtoken" do
|
|
615
|
+
it "gets data about a transaction", :vcr do
|
|
616
|
+
order_id = generate_id
|
|
617
|
+
result = @service.entry_tran_brandtoken({
|
|
618
|
+
:order_id => order_id,
|
|
619
|
+
:job_cd => "AUTH",
|
|
620
|
+
:amount => 1000
|
|
621
|
+
})
|
|
622
|
+
access_id = result["AccessID"]
|
|
623
|
+
access_pass = result["AccessPass"]
|
|
624
|
+
@service.exec_tran_brandtoken({
|
|
625
|
+
:order_id => order_id,
|
|
626
|
+
:access_id => access_id,
|
|
627
|
+
:access_pass => access_pass,
|
|
628
|
+
:token_type => :apple_pay,
|
|
629
|
+
:token => 'base64encodedtoken'
|
|
630
|
+
})
|
|
631
|
+
member_id = generate_id
|
|
632
|
+
@shop_site.trade_brandtoken({
|
|
633
|
+
:member_id => member_id,
|
|
634
|
+
:order_id => order_id
|
|
635
|
+
})
|
|
636
|
+
result = @service.sales_tran_brandtoken({
|
|
637
|
+
:access_id => access_id,
|
|
638
|
+
:access_pass => access_pass,
|
|
639
|
+
:order_id => order_id,
|
|
640
|
+
:amount => 1000
|
|
641
|
+
})
|
|
642
|
+
result["AccessID"].nil?.should_not be true
|
|
643
|
+
result["AccessPass"].nil?.should_not be true
|
|
644
|
+
result["Status"].nil?.should_not be true
|
|
645
|
+
result["Forward"].nil?.should_not be true
|
|
646
|
+
result["Approve"].nil?.should_not be true
|
|
647
|
+
result["TranID"].nil?.should_not be true
|
|
648
|
+
result["TranDate"].nil?.should_not be true
|
|
649
|
+
end
|
|
650
|
+
|
|
651
|
+
it "got error if missing options", :vcr do
|
|
652
|
+
lambda {
|
|
653
|
+
result = @service.sales_tran_brandtoken()
|
|
654
|
+
}.should raise_error('Required access_id, access_pass, order_id, amount were not provided.')
|
|
655
|
+
end
|
|
656
|
+
end
|
|
657
|
+
|
|
658
|
+
describe "#refund_tran_brandtoken" do
|
|
659
|
+
it "gets data about a transaction", :vcr do
|
|
660
|
+
order_id = generate_id
|
|
661
|
+
result = @service.entry_tran_brandtoken({
|
|
662
|
+
:order_id => order_id,
|
|
663
|
+
:job_cd => "CAPTURE",
|
|
664
|
+
:amount => 1000
|
|
665
|
+
})
|
|
666
|
+
access_id = result["AccessID"]
|
|
667
|
+
access_pass = result["AccessPass"]
|
|
668
|
+
@service.exec_tran_brandtoken({
|
|
669
|
+
:order_id => order_id,
|
|
670
|
+
:access_id => access_id,
|
|
671
|
+
:access_pass => access_pass,
|
|
672
|
+
:token_type => :apple_pay,
|
|
673
|
+
:token => 'base64encodedtoken'
|
|
674
|
+
})
|
|
675
|
+
result = @service.refund_tran_brandtoken({
|
|
676
|
+
:access_id => access_id,
|
|
677
|
+
:access_pass => access_pass,
|
|
678
|
+
:order_id => order_id,
|
|
679
|
+
:amount => 1000
|
|
680
|
+
})
|
|
681
|
+
result["AccessID"].nil?.should_not be true
|
|
682
|
+
result["AccessPass"].nil?.should_not be true
|
|
683
|
+
result["Status"].nil?.should_not be true
|
|
684
|
+
result["Forward"].nil?.should_not be true
|
|
685
|
+
result["Approve"].nil?.should_not be true
|
|
686
|
+
result["TranID"].nil?.should_not be true
|
|
687
|
+
result["TranDate"].nil?.should_not be true
|
|
688
|
+
end
|
|
689
|
+
|
|
690
|
+
it "got error if missing options", :vcr do
|
|
691
|
+
lambda {
|
|
692
|
+
result = @service.refund_tran_brandtoken()
|
|
693
|
+
}.should raise_error('Required access_id, access_pass, order_id, amount were not provided.')
|
|
694
|
+
end
|
|
695
|
+
end
|
|
696
|
+
|
|
697
|
+
describe "#cvs_cancel" do
|
|
698
|
+
it "gets data about a transaction", :vcr do
|
|
699
|
+
order_id = generate_id
|
|
700
|
+
result = @service.entry_tran_cvs({
|
|
701
|
+
:order_id => order_id,
|
|
702
|
+
:amount => 100
|
|
703
|
+
})
|
|
704
|
+
access_id = result["AccessID"]
|
|
705
|
+
access_pass = result["AccessPass"]
|
|
706
|
+
result = @service.cvs_cancel({
|
|
707
|
+
:order_id => order_id,
|
|
708
|
+
:access_id => access_id,
|
|
709
|
+
:access_pass => access_pass,
|
|
710
|
+
})
|
|
711
|
+
|
|
712
|
+
result["OrderID"].nil?.should_not be_truthy
|
|
713
|
+
result["Status"].nil?.should_not be_truthy
|
|
714
|
+
end
|
|
715
|
+
|
|
716
|
+
it "got error if missing options", :vcr do
|
|
717
|
+
lambda {
|
|
718
|
+
result = @service.cvs_cancel()
|
|
719
|
+
}.should raise_error("Required access_id, access_pass, order_id were not provided.")
|
|
720
|
+
end
|
|
721
|
+
end
|
|
366
722
|
|
|
367
723
|
describe "#search_trade" do
|
|
368
724
|
it "gets data about order", :vcr do
|
|
@@ -370,24 +726,24 @@ describe "GMO::Payment::ShopAPI" do
|
|
|
370
726
|
result = @service.search_trade({
|
|
371
727
|
:order_id => order_id
|
|
372
728
|
})
|
|
373
|
-
result["OrderID"].nil?.should_not
|
|
374
|
-
result["Status"].nil?.should_not
|
|
375
|
-
result["ProcessDate"].nil?.should_not
|
|
376
|
-
result["JobCd"].nil?.should_not
|
|
377
|
-
result["AccessID"].nil?.should_not
|
|
378
|
-
result["AccessPass"].nil?.should_not
|
|
379
|
-
result["ItemCode"].nil?.should_not
|
|
380
|
-
result["Amount"].nil?.should_not
|
|
381
|
-
result["Tax"].nil?.should_not
|
|
382
|
-
result["SiteID"].nil?.should_not
|
|
383
|
-
result["MemberID"].nil?.should_not
|
|
384
|
-
result["CardNo"].nil?.should_not
|
|
385
|
-
result["Expire"].nil?.should_not
|
|
386
|
-
result["Method"].nil?.should_not
|
|
387
|
-
result["PayTimes"].nil?.should_not
|
|
388
|
-
result["Forward"].nil?.should_not
|
|
389
|
-
result["TranID"].nil?.should_not
|
|
390
|
-
result["Approve"].nil?.should_not
|
|
729
|
+
result["OrderID"].nil?.should_not be_truthy
|
|
730
|
+
result["Status"].nil?.should_not be_truthy
|
|
731
|
+
result["ProcessDate"].nil?.should_not be_truthy
|
|
732
|
+
result["JobCd"].nil?.should_not be_truthy
|
|
733
|
+
result["AccessID"].nil?.should_not be_truthy
|
|
734
|
+
result["AccessPass"].nil?.should_not be_truthy
|
|
735
|
+
result["ItemCode"].nil?.should_not be_truthy
|
|
736
|
+
result["Amount"].nil?.should_not be_truthy
|
|
737
|
+
result["Tax"].nil?.should_not be_truthy
|
|
738
|
+
result["SiteID"].nil?.should_not be_truthy
|
|
739
|
+
result["MemberID"].nil?.should_not be_truthy
|
|
740
|
+
result["CardNo"].nil?.should_not be_truthy
|
|
741
|
+
result["Expire"].nil?.should_not be_truthy
|
|
742
|
+
result["Method"].nil?.should_not be_truthy
|
|
743
|
+
result["PayTimes"].nil?.should_not be_truthy
|
|
744
|
+
result["Forward"].nil?.should_not be_truthy
|
|
745
|
+
result["TranID"].nil?.should_not be_truthy
|
|
746
|
+
result["Approve"].nil?.should_not be_truthy
|
|
391
747
|
end
|
|
392
748
|
|
|
393
749
|
it "got error if missing options", :vcr do
|
|
@@ -399,30 +755,29 @@ describe "GMO::Payment::ShopAPI" do
|
|
|
399
755
|
|
|
400
756
|
describe "#search_trade_multi" do
|
|
401
757
|
it "gets data about order", :vcr do
|
|
402
|
-
client_field_1 = "client_field1"
|
|
403
758
|
result = @service.search_trade_multi({
|
|
404
759
|
:order_id => @order_id,
|
|
405
760
|
:pay_type => "0"
|
|
406
761
|
})
|
|
407
|
-
result["Status"].nil?.should_not
|
|
408
|
-
result["ProcessDate"].nil?.should_not
|
|
409
|
-
result["JobCd"].nil?.should_not
|
|
410
|
-
result["AccessID"].nil?.should_not
|
|
411
|
-
result["AccessPass"].nil?.should_not
|
|
412
|
-
result["ItemCode"].nil?.should_not
|
|
413
|
-
result["Amount"].nil?.should_not
|
|
414
|
-
result["Tax"].nil?.should_not
|
|
415
|
-
result["SiteID"].nil?.should_not
|
|
416
|
-
result["MemberID"].nil?.should_not
|
|
417
|
-
result["CardNo"].nil?.should_not
|
|
418
|
-
result["Expire"].nil?.should_not
|
|
419
|
-
result["Method"].nil?.should_not
|
|
420
|
-
result["PayTimes"].nil?.should_not
|
|
421
|
-
result["Forward"].nil?.should_not
|
|
422
|
-
result["TranID"].nil?.should_not
|
|
423
|
-
result["Approve"].nil?.should_not
|
|
424
|
-
result["PayType"].nil?.should_not
|
|
425
|
-
result["PaymentTerm"].nil?.should_not
|
|
762
|
+
result["Status"].nil?.should_not be_truthy
|
|
763
|
+
result["ProcessDate"].nil?.should_not be_truthy
|
|
764
|
+
result["JobCd"].nil?.should_not be_truthy
|
|
765
|
+
result["AccessID"].nil?.should_not be_truthy
|
|
766
|
+
result["AccessPass"].nil?.should_not be_truthy
|
|
767
|
+
result["ItemCode"].nil?.should_not be_truthy
|
|
768
|
+
result["Amount"].nil?.should_not be_truthy
|
|
769
|
+
result["Tax"].nil?.should_not be_truthy
|
|
770
|
+
result["SiteID"].nil?.should_not be_truthy
|
|
771
|
+
result["MemberID"].nil?.should_not be_truthy
|
|
772
|
+
result["CardNo"].nil?.should_not be_truthy
|
|
773
|
+
result["Expire"].nil?.should_not be_truthy
|
|
774
|
+
result["Method"].nil?.should_not be_truthy
|
|
775
|
+
result["PayTimes"].nil?.should_not be_truthy
|
|
776
|
+
result["Forward"].nil?.should_not be_truthy
|
|
777
|
+
result["TranID"].nil?.should_not be_truthy
|
|
778
|
+
result["Approve"].nil?.should_not be_truthy
|
|
779
|
+
result["PayType"].nil?.should_not be_truthy
|
|
780
|
+
result["PaymentTerm"].nil?.should_not be_truthy
|
|
426
781
|
end
|
|
427
782
|
|
|
428
783
|
it "got error if missing options", :vcr do
|