26 lines
697 B
Ruby
26 lines
697 B
Ruby
module Public
|
|
module Api
|
|
module V1
|
|
module Captain
|
|
class PaymentsController < ApplicationController
|
|
layout false
|
|
skip_before_action :authenticate_user!, raise: false
|
|
skip_before_action :check_current_user_is_active, raise: false
|
|
|
|
def show
|
|
@charge = GlobalID::Locator.locate_signed(params[:token], purpose: :pix_payment)
|
|
|
|
return unless @charge.nil?
|
|
|
|
render plain: 'Link de pagamento inválido ou expirado.', status: :not_found
|
|
return
|
|
|
|
# @charge is available for the view
|
|
# It should be a Captain::PixCharge model
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|