Class: Wirecard::NotificationsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Wirecard::NotificationsController
- Defined in:
- app/controllers/wirecard/notifications_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
Actions —————————————————————————————.
Instance Method Details
#create ⇒ Object
Actions
48 49 50 51 52 53 54 55 56 |
# File 'app/controllers/wirecard/notifications_controller.rb', line 48 def create build_resource if @notification.save render json: { status: 'OK', errorCodes: 'null', 'QPAY-CONFIRMATION-RESPONSE' => { result: 'OK'} } else render json: { status: 'NOK', errorCodes: '1', 'QPAY-CONFIRMATION-RESPONSE' => { result: 'NOK', message: @notification.errors..join('; ') } } end end |