README.md in active_merchant-epsilon-0.8.1 vs README.md in active_merchant-epsilon-0.9.0

- old
+ new

@@ -270,9 +270,39 @@ ```ruby gateway.void('order_number') ``` +### Virtual Account Payment + +```ruby +ActiveMerchant::Billing::EpsilonVirtualAccountGateway.contract_code = 'YOUR_CONTRACT_CODE' + +gateway = ActiveMerchant::Billing::EpsilonVirtualAccountGateway.new + +amount = 10000 + +purchase_detail = { + user_id: 'YOUR_APP_USER_IDENTIFIER', + user_name: '山田 太郎', + user_email: 'yamada-taro@example.com', + item_code: 'ITEM001', + item_name: 'Greate Product', + order_number: 'UNIQUE ORDER NUMBER', + user_name_kana: 'ヤマダタロウ' +} + +response = gateway.purchase(amount, purchase_detail) + +if response.success? + puts "Successfully charged #{amount} yen as virtual account payment" + puts "Account number is #{response.params['account_number']}" + puts "Bank name is #{response.params['account_name']}" +else + raise StandardError, response.message +end +``` + ### Error handling If epsilon server returns status excepted 200, `#purchase` method raise `ActiveMerchant::ResponseError`. When your request parameters are wrong(e.g. contract_code), the method returns failure response.