Sha256: 79f26a8a1f81760356333d6b92e2a555b834590b7b907d43eb733a0efbadf234

Contents?: true

Size: 455 Bytes

Versions: 58

Compression:

Stored size: 455 Bytes

Contents

module Paypal
  module IPN
    def self.endpoint
      _endpoint_ = URI.parse Paypal.endpoint
      _endpoint_.query = {
        :cmd => '_notify-validate'
      }.to_query
      _endpoint_.to_s
    end

    def self.verify!(raw_post)
      response = RestClient.post(
        endpoint, raw_post
      )
      case response.body
      when 'VERIFIED'
        true
      else
        raise Exception::APIError.new(response.body)
      end
    end
  end
end

Version data entries

58 entries across 58 versions & 4 rubygems

Version Path
ianfleeton-paypal-express-1.1.0 lib/paypal/ipn.rb
ianfleeton-paypal-express-1.0.0 lib/paypal/ipn.rb
ianfleeton-paypal-express-0.8.7 lib/paypal/ipn.rb
ianfleeton-paypal-express-0.8.6 lib/paypal/ipn.rb
ianfleeton-paypal-express-0.8.5 lib/paypal/ipn.rb
ianfleeton-paypal-express-0.8.4 lib/paypal/ipn.rb
creative-paypal-express-1.4.1 lib/paypal/ipn.rb
creative-paypal-express-1.4.0 lib/paypal/ipn.rb
creative-paypal-express-1.3.0 lib/paypal/ipn.rb
ianfleeton-paypal-express-0.8.3 lib/paypal/ipn.rb
ianfleeton-paypal-express-0.8.2 lib/paypal/ipn.rb
creative-paypal-express-1.2.1 lib/paypal/ipn.rb
creative-paypal-express-1.2.0 lib/paypal/ipn.rb
creative-paypal-express-1.1.0 lib/paypal/ipn.rb
dfg-paypal-0.8.2 lib/paypal/ipn.rb
creative-paypal-express-1.0.1.dev2 lib/paypal/ipn.rb
creative-paypal-express-1.0.1.dev1 lib/paypal/ipn.rb
creative-paypal-express-1.0.0 lib/paypal/ipn.rb
creative-paypal-express-0.8.2.4 lib/paypal/ipn.rb
creative-paypal-express-0.8.2.3 lib/paypal/ipn.rb