Sha256: bfb14277e94ddf9b630f2f266633c73b875992aa3de0085dc27d7d9e35c379bd

Contents?: true

Size: 581 Bytes

Versions: 12

Compression:

Stored size: 581 Bytes

Contents

require 'kaui/killbill_helper'

class Kaui::PaymentMethodsController < Kaui::EngineController
  def show
    # TODO: show payment method details
  end

  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
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
kaui-0.2.2 app/controllers/kaui/payment_methods_controller.rb
kaui-0.2.1 app/controllers/kaui/payment_methods_controller.rb
kaui-0.2.0 app/controllers/kaui/payment_methods_controller.rb
kaui-0.1.18 app/controllers/kaui/payment_methods_controller.rb
kaui-0.1.17 app/controllers/kaui/payment_methods_controller.rb
kaui-0.1.16 app/controllers/kaui/payment_methods_controller.rb
kaui-0.1.15 app/controllers/kaui/payment_methods_controller.rb
kaui-0.1.14 app/controllers/kaui/payment_methods_controller.rb
kaui-0.1.12 app/controllers/kaui/payment_methods_controller.rb
kaui-0.1.11 app/controllers/kaui/payment_methods_controller.rb
kaui-0.1.10 app/controllers/kaui/payment_methods_controller.rb
kaui-0.1.9 app/controllers/kaui/payment_methods_controller.rb