Class: DefraRubyMocks::WorldpayController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- DefraRubyMocks::WorldpayController
- Defined in:
- app/controllers/defra_ruby_mocks/worldpay_controller.rb
Instance Method Summary collapse
Instance Method Details
#dispatcher ⇒ Object
17 18 19 20 21 22 |
# File 'app/controllers/defra_ruby_mocks/worldpay_controller.rb', line 17 def dispatcher success_url = params[:successURL] redirect_to WorldpayResponseService.run(success_url) rescue StandardError head 500 end |
#payments_service ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'app/controllers/defra_ruby_mocks/worldpay_controller.rb', line 8 def payments_service @values = WorldpayRequestHandlerService.run(convert_request_body_to_xml) render_payment_response if @values[:request_type] == :payment render_refund_response if @values[:request_type] == :refund rescue StandardError head 500 end |