Class: Wirecard::NotificationsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/wirecard/notifications_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject

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.full_messages.join('; ') } }
  end
end