Sha256: 24d57247fbb3dbeaa1c07d86d256d150323db3a729fcdcf3f337434d2615a396
Contents?: true
Size: 957 Bytes
Versions: 9
Compression:
Stored size: 957 Bytes
Contents
module Effective module Providers module Paypal extend ActiveSupport::Concern included do skip_before_filter :verify_authenticity_token, :only => [:paypal_postback] if defined?(CanCan) skip_authorization_check only: [:paypal_postback] end end def paypal_postback @order ||= Effective::Order.where(id: (params[:invoice].to_i rescue 0)).first if @order.present? if @order.purchased? order_purchased(details: params, provider: 'paypal', card: params[:payment_type]) elsif (params[:payment_status] == 'Completed' && params[:custom] == EffectiveOrders.paypal[:secret]) order_purchased(details: params, provider: 'paypal', card: params[:payment_type]) else order_declined(details: params, provider: 'paypal', card: params[:payment_type]) end end head(:ok) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems