Sha256: 51db1142dff7f5d8fff9be3be6eaf10b0afd4bad8747268724d22bce7455671b

Contents?: true

Size: 964 Bytes

Versions: 92

Compression:

Stored size: 964 Bytes

Contents

module ActiveMerchant #:nodoc:
  module Billing #:nodoc:
    class PaypalExpressResponse < Response
      def email
        @params['payer']
      end
      
      def name
        [@params['first_name'], @params['middle_name'], @params['last_name']].compact.join(' ')
      end
      
      def token
        @params['token']
      end
      
      def payer_id
        @params['payer_id']
      end
      
      def payer_country
        @params['payer_country']
      end
      
      def address
        {  'name'       => @params['name'],
           'company'    => @params['payer_business'],
           'address1'   => @params['street1'],
           'address2'   => @params['street2'],
           'city'       => @params['city_name'],
           'state'      => @params['state_or_province'],
           'country'    => @params['country'],
           'zip'        => @params['postal_code'],
           'phone'      => nil
        }
      end
    end
  end
end

Version data entries

92 entries across 92 versions & 25 rubygems

Version Path
johnideal-activemerchant-1.4.10 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
johnideal-activemerchant-1.4.11 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
johnideal-activemerchant-1.4.4 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
johnideal-activemerchant-1.4.5 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
johnideal-activemerchant-1.4.6 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
johnideal-activemerchant-1.4.7 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
johnideal-activemerchant-1.4.8 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
mattbauer-activemerchant-1.4.2 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
seamusabshere-active_merchant-1.4.2.1 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
seamusabshere-active_merchant-1.4.2.3 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
tomriley-active_merchant-1.4.2.3 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
tomriley-active_merchant-1.4.2.4 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
tomriley-active_merchant-1.4.2.5 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
tomriley-active_merchant-1.4.2.6 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
tomriley-active_merchant-1.4.2.7 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
tomriley-active_merchant-1.4.2.8 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
tomriley-tomriley-active_merchant-1.4.2.4 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
goldstar-activemerchant-1.4.2.7 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
activemerchant-abn-ideal-1.7.0c lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
activemerchant-abn-ideal-1.7.0b lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb