class Callbacks::CcbillsController
Public Instance Methods
create()
click to toggle source
POST: Webhooks
# File lib/ccbill_ruby/cli/install/ccbill_controller.rb, line 19 def create begin # Your code goes here. rescue StandardError => error # I assume we should put `rescue` statement because CCBill will call our server again and again untill he will receive 200 # When there was failure of sending webhooks or the system was under maintenance at the moment. end head :ok end
show()
click to toggle source
GET: Redirect from payment system after approval/deny.
# File lib/ccbill_ruby/cli/install/ccbill_controller.rb, line 5 def show case params[:mppResponse] when 'CheckoutSuccess' flash[:notice] = "Payment was successfully paid" when 'CheckoutFail' flash[:alert] = "Payment was declined. We're sorry" else fail 'Unknown mmpResponse' end redirect_to root_url end