-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from ken1flan/Add_ganb
銀行振込(バーチャル口座 あおぞら)の追加
- Loading branch information
Showing
4 changed files
with
181 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
...ures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_ganb_gets_data_about_a_transaction.yml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
68 changes: 68 additions & 0 deletions
68
fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_ganb_gets_data_about_a_transaction.yml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -117,6 +117,25 @@ | |
end | ||
end | ||
|
||
describe "#entry_tran_ganb" do | ||
it "gets data about a transaction", :vcr do | ||
order_id = @order_id | ||
result = @service.entry_tran_ganb({ | ||
:order_id => order_id, | ||
:amount => 100 | ||
}) | ||
result["AccessID"].nil?.should_not be_truthy | ||
result["AccessPass"].nil?.should_not be_truthy | ||
end | ||
|
||
it "got error if missing options", :vcr do | ||
lambda { | ||
result = @service.entry_tran_ganb() | ||
}.should raise_error("Required order_id, amount were not provided.") | ||
end | ||
end | ||
|
||
|
||
describe "#entry_tran_linepay" do | ||
it "gets data about a transaction", :vcr do | ||
order_id = @order_id | ||
|
@@ -475,6 +494,45 @@ | |
end | ||
end | ||
|
||
describe "#exec_tran_ganb" do | ||
it "gets data about a transaction", :vcr do | ||
order_id = generate_id | ||
result = @service.entry_tran_ganb({ | ||
:order_id => order_id, | ||
:amount => 100 | ||
}) | ||
access_id = result["AccessID"] | ||
access_pass = result["AccessPass"] | ||
result = @service.exec_tran_ganb({ | ||
:order_id => order_id, | ||
:access_id => access_id, | ||
:access_pass => access_pass, | ||
:client_field_1 => '加盟店自由項目1です。', | ||
:client_field_2 => '加盟店自由項目2です。', | ||
:client_field_3 => '加盟店自由項目3です。', | ||
:account_holder_optional_name => 'コウザタロウ', | ||
:trade_days => '3', | ||
:trade_reason => '取引事由です。', | ||
:trade_client_name => '依頼花子', | ||
:trade_client_mailaddress => '[email protected]' | ||
}) | ||
result["BankCode"].nil?.should_not be_truthy | ||
result["BankName"].nil?.should_not be_truthy | ||
result["BranchCode"].nil?.should_not be_truthy | ||
result["BranchName"].nil?.should_not be_truthy | ||
result["AccountType"].nil?.should_not be_truthy | ||
result["AccountNumber"].nil?.should_not be_truthy | ||
result["AccountHolderName"].nil?.should_not be_truthy | ||
result["AvailableDate"].nil?.should_not be_truthy | ||
end | ||
|
||
it "got error if missing options", :vcr do | ||
lambda { | ||
result = @service.exec_tran_ganb() | ||
}.should raise_error("Required access_id, access_pass, order_id were not provided.") | ||
end | ||
end | ||
|
||
describe "#exec_tran_linepay" do | ||
it "gets data about a transaction", :vcr do | ||
order_id = generate_id | ||
|