Class: CheckoutsController
- Inherits:
-
Spree::BaseController
- Object
- ActionController::Base
- ApplicationController
- Spree::BaseController
- CheckoutsController
- Includes:
- ActionView::Helpers::NumberHelper
- Defined in:
- app/controllers/checkouts_controller.rb
Instance Method Summary collapse
-
#rc_update ⇒ Object
alias original r_c method so we can handle any (gateway) exceptions that might be thrown.
- #update ⇒ Object
Methods inherited from Spree::BaseController
#access_forbidden, #default_title, #find_order, #initialize_extension_partials, #set_title, #title
Methods inherited from ApplicationController
Methods included from EasyRoleRequirementSystem
Methods included from EasyRoleRequirementSystem::InstanceMethods
Methods included from RoleRequirementSystem
Instance Method Details
#rc_update ⇒ Object
alias original r_c method so we can handle any (gateway) exceptions that might be thrown
13 |
# File 'app/controllers/checkouts_controller.rb', line 13 alias :rc_update :update |
#update ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'app/controllers/checkouts_controller.rb', line 14 def update begin rc_update rescue Spree::GatewayError => ge flash[:error] = t("unable_to_authorize_credit_card") + ": #{ge.}" redirect_to edit_object_url and return rescue Exception => oe flash[:error] = t("unable_to_authorize_credit_card") + ": #{oe.}" logger.unknown "#{flash[:error]} #{oe.backtrace.join("\n")}" redirect_to edit_object_url and return end end |