Home: https://www.gmo-pg.com/en/
Contents:
To start accepting payments in test environment, you will need to register your company with GMO.
If the information given in the form is correct, then you will receive an email to confirm the registration.
After confirmation, you will get another email with urls, usernames and passwords for Site and Shop management screens.
Sample url for Site Management Screen - https://kt01.mul-pay.jp/mulpayconsole/site/tsite00025073/
On successful login, you will need to reset both the passwords.
Under Site management -> Site information, you will find the Site ID and Password.
site:
id: tsite00025074
password: 3hmhabb8
For Shop details, you can go to Site management -> Shop information and search for the shop you entered while registering on GMO.
Then clicking on the search result, you can access Shop ID and Password under Shop management -> Shop information.
shop:
id: tshop00027679
password: xrcg4vro
Include the javascript based on your environnemt.
test: 'https://pt01.mul-pay.jp/ext/js/token.js'
production: 'https://p01.mul-pay.jp/ext/js/token.js'
Use Shop ID generated above to initialize the javascript library.
Multipayment.init(shop_id);
Multipayment.getToken({
holdername: 'Abby Yarbro',
cardno: '4111111111111111', // card number without spaces
expire: '201905', // expiry in format 'YYYYMM'
securitycode: '123'
}, 'gmoResponseHandler'); // callback function should be a string only
function gmoResponseHandler(response) {
if(repsonse.resultCode != '000') {
// show error message
} else {
token = response.tokenObject.token;
// use this token instead of card details to create transactions
}
}
This feature is available on a PR.
- URL: https://test-remittance.gmopg.jp/admin/rshop00000971/login.action
- Shop ID: rshop00000971
- Shop PASS: 2c48yzyr
gmo = GMO::Payment::RemittanceAPI.new(shop_id: <Shop ID>,
shop_pass: <Shop PASS>,
host: 'test-remittance.gmopg.jp')
options = { bank_id: 'bank00001',
bank_code: '0001',
branch_code: '813',
account_type: :normal,
account_name: 'An Yutzy',
account_number: '0012345' }
gmo.create_account(options) # => {"Bank_ID"=>"bank00001", "Method"=>"1"}
You can get the correct combinations of Bank Code and Branch Code from below links:
- https://www.mizuhobank.com/japan/branches/index.html
- http://www.japanbankdirectory.com/
- https://github.com/zengin-code/source-data/tree/a2853b030af8ca0dee96fdae723384a64bde6586/data
account_type
can be set to any one of the below:
:normal
:current
:savings
Additional options that you can pass to create_account
method are:
free
Use it to store some metadata on the APIbranch_code_jp
e.g. MHCBJPJTaccount_number_jp
e.g. 01234567
response = gmo.search_account(bank_id: 'bank12345') # => {"Bank_ID"=>"bank12345", "Bank_Name"=>"みずほ銀行",
# "Bank_Code"=>"0001", "Branch_Name"=>"札幌支店",
# "Branch_Code"=>"813", "Account_Type"=>"1",
# "Account_Number"=>"0012345", "Account_Name"=>"An Yutzy",
# "Free"=>"", "Branch_Code_Jpbank"=>"", "Account_Number_Jpbank"=>""}
options = { bank_id: 'bank00001',
bank_code: '0001',
branch_code: '813',
account_type: :normal,
account_name: 'An Yutzy',
account_number: '0012345' }
gmo.update_account(options) # => {"Bank_ID"=>"bank00001", "Method"=>"2"}
options = { bank_id: 'bank00001' }
gmo.delete_account(options) # => {"Bank_ID"=>"bank00001", "Method"=>"3"}
options = { bank_id: 'bank00000',
deposit_id: 'dep00000',
amount: '1000' }
gmo.create_deposit(options) # => {"Deposit_ID"=>"dep00000", "Bank_ID"=>"bank00000",
# "Method"=>"1", "Amount"=>"1000", "Bank_Fee"=>"27"}
gmo.search_deposit(deposit_id: 'dep00000') # => {"Deposit_ID"=>"dep00000", "Bank_ID"=>"bank163144",
# "Bank_Name"=>"みずほ銀行", "Bank_Code"=>"0001", "Branch_Name"=>"札幌支店",
# "Branch_Code"=>"813", "Account_Type"=>"1", "Account_Number"=>"0012345",
# "Account_Name"=>"An Yutzy", "Free"=>"", "Amount"=>"181035",
# "Bank_Fee"=>"270", "Result"=>"0", "Branch_Code_Jpbank"=>"",
# "Account_Number_Jpbank"=>"", "Deposit_Date"=>"", "Result_Detail"=>""}
options = { bank_id: 'bank00000', deposit_id: 'dep00000' }
gmo.cancel_deposit(options) # => {"Deposit_ID"=>"dep00000", "Bank_ID"=>"bank00000", "Method"=>"2"}
gmo.search_balance # => {"Shop_ID"=>"rshop00000071", "Balance"=>"9818965", "Balance_Forecast"=>"9818965"}
options = { deposit_id: 'dep00001',
deposit_email: '[email protected]',
amount: 1000,
deposit_account_name: 'An Yutzy',
expire: 5,
deposit_shop_email: '[email protected]' }
gmo.create_mail_deposit(options) # => {"Deposit_ID"=>"dep00001", "Method"=>"1", "Amount"=>"1000", "Expire"=>"20170503"}
options[:expire]
represents number of days in advance to allow registration, from 1 to 30.
gmo.search_mail_deposit(deposit_id: 'dep00001') # => {"Deposit_ID"=>"dep00001", "Mail_Address"=>"[email protected]",
# "Shop_Mail_Address"=>"[email protected]", "Account_Name"=>"An Yutzy",
# "Amount"=>"1000", "Expire"=>"20170503", "Status"=>"0"}
options = { deposit_id: 'dep00001' }
gmo.cancel_mail_deposit(options) # => {"Deposit_ID"=>"dep00001", "Method"=>"2"}