-
Notifications
You must be signed in to change notification settings - Fork 104
Remittance API
Jagdeep Singh edited this page May 1, 2017
·
1 revision
This feature is available on a PR.
GMO gem can be used to setup payment accounts and registering deposits for those accounts.
gmo = GMO::Payment::RemittanceAPI.new \
shop_id: 'foo',
shop_pass: 'bar',
host: 'test-remittance.gmopg.jp'
result = gmo.create_account \
bank_id: 'bank12345',
bank_code: '0001',
branch_code: '813',
account_type: :normal,
account_name: 'An Yutzy',
account_number: '0012345'
account_type
accepts values :normal
, :current
and :savings
.
Other options that can be passed to create_account
are:
-
free
A field for storing any metadata with the account -
branch_code_jp
Branch code in Japanese -
account_number_jp
Account number in Japanese
result = gmo.update_account \
bank_id: 'bank12345',
bank_code: '0001',
branch_code: '813',
account_type: :normal,
account_name: 'An Yutzy',
account_number: '0012345'
All the options from create_account
can also be passed to update_account
.
result = gmo.delete_account(bank_id: 'bank12345')
result = gmo.search_account(bank_id: 'bank12345')
result = gmo.create_deposit \
bank_id: 'bank12345',
deposit_id: 'dep00001',
amount: '1000'
result = gmo.cancel_deposit \
bank_id: 'bank12345',
deposit_id: 'dep00001'
result = gmo.search_deposit(deposit_id: 'dep00001')
result = gmo.search_balance
result = gmo.create_mail_deposit \
deposit_id: 'dep00001',
deposit_email: 'anyutzy@demo.com',
amount: 1000,
deposit_account_name: 'An Yutzy',
expire: 5,
deposit_shop_email: 'anyutzy@demo.com'
expire
represents the number of days in advance to allow registration, from 1 to 30.
result = gmo.cancel_mail_deposit(deposit_id: 'dep00001')
result = gmo.search_mail_deposit(deposit_id: 'dep00001')