Sha256: 14038c67f7457b80322c8885c1332fe0835b25a55cb9d9f936ba88e91cd4e07a

Contents?: true

Size: 578 Bytes

Versions: 2

Compression:

Stored size: 578 Bytes

Contents

class PaysController < ApplicationController
  skip_before_action :verify_authenticity_token

  def notify
    transaction_status = params["transaction_status"]
    fraud_status = params["fraud_status"]

    if transaction_status == "capture" && fraud_status == "accept"
      Order.find_by_order_id(params["order_id"]).update_attributes!(
        transaction_status: transaction_status
      )
    end

    render text: "OK"
  end

  def finish
    redirect_to rooms_path
  end

  def unfinish
    redirect_to rooms_path
  end

  def error
    redirect_to rooms_path
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
veritrans-2.3.0 example/rails/cable/app/controllers/pays_controller.rb
veritrans-2.2.0 example/rails/cable/app/controllers/pays_controller.rb