if ::Object.const_defined?(:Rails) require 'rails/generators' module Veritrans module Generators class InstallGenerator < ::Rails::Generators::Base desc < 'merchant#checkout', :via => :get # show checkout form") route("match 'confirm' => 'veritrans#confirm', :via => :post # pay-confirmation autosubmit to veritrans server") route("match 'cancel' => 'veritrans#cancel', :via => :post # canceling transaction redirect back to merchant-web") route("match 'pay' => 'veritrans#pay', :via => :post # server to server pay-notification to merchant-web") route("match 'finish' => 'veritrans#finish', :via => :post # successfull transaction redirect back to merchant-web") route("match 'error' => 'veritrans#error', :via => :post # error transaction redirect back to merchant-web") end hook_for :test_framework end end end end