Class: Kaui::PaymentMethodsController

Inherits:
EngineController show all
Defined in:
app/controllers/kaui/payment_methods_controller.rb

Instance Method Summary collapse

Methods inherited from EngineController

#current_user

Methods included from ErrorHelper

#as_string

Instance Method Details

#destroyObject



8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'app/controllers/kaui/payment_methods_controller.rb', line 8

def destroy
  payment_method_id = params[:id]
  if payment_method_id.present?
    begin
      Kaui::KillbillHelper.delete_payment_method(payment_method_id, params[:set_auto_pay_off])
    rescue => e
      flash[:error] = "Error while deleting payment method #{payment_method_id}: #{as_string(e)}"
    end
  else
    flash[:notice] = "Did not get the payment method id"
  end
  redirect_to :back
end

#showObject



4
5
6
# File 'app/controllers/kaui/payment_methods_controller.rb', line 4

def show
  # TODO: show payment method details
end