Sha256: 6f22cf5ee440a0ae82cdf5567c74371cd680ba5e39164c59206afe89d83b26b4

Contents?: true

Size: 1.03 KB

Versions: 6

Compression:

Stored size: 1.03 KB

Contents

module GeeePay
  class NotifyController < ::ActionController::Base
    if _process_action_callbacks.any?{|a| a.filter == :verify_authenticity_token}
      # ActionController::Base no longer protects from forgery in Rails 5
      skip_before_filter :verify_authenticity_token
    end

    layout false

    def index
      notice = GeeePay::Notice.new
      notice.version_id = params[:versionId]
      notice.trans_type = params[:transType]
      notice.asyn_notify_url = params[:asynNotifyUrl]
      notice.syn_notify_url = params[:synNotifyUrl]
      notice.mer_id = params[:merId]
      notice.order_amount = params[:orderAmount]
      notice.prd_ord_no = params[:prdOrdNo]
      notice.order_status = params[:orderStatus]
      notice.pay_id = params[:payId]
      notice.pay_time = params[:payTime]
      notice.sign_type = params[:signType]
      notice.mer_param = params[:merParam]
      notice.sign_data = params[:signData]
      if notice.save
        render text: 'SUCCESS'
      else
        render text: 'FAIL'
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
geee_pay-0.1.5 app/controllers/notify_controller.rb
geee_pay-0.1.4 app/controllers/notify_controller.rb
geee_pay-0.1.3 app/controllers/notify_controller.rb
geee_pay-0.1.2 app/controllers/notify_controller.rb
geee_pay-0.1.1 app/controllers/notify_controller.rb
geee_pay-0.1.0 app/controllers/notify_controller.rb