Sha256: 53da461cad80892c2905cfb49515b16a7f6f5407813a7391d00e66a8ca2e530b
Contents?: true
Size: 615 Bytes
Versions: 6
Compression:
Stored size: 615 Bytes
Contents
require_dependency 'opay/application_controller' module Opay class PaypalController < ApplicationController def new unless Opay.config.process_payments_localy redirect_to Providers::Paypal.create_payment( params[:session_id], params[:desc], params[:client_ip], params[:confirm_url], params[:cancel_url], ) end end def confirm if Providers::Paypal.process(params[:token], params[:PayerID], request.remote_ip) redirect_to main_app.root_path, notice: I18n.t('opay.payment.success') end end end end
Version data entries
6 entries across 6 versions & 1 rubygems