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
goldstar-activemerchant-1.4.2.6 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
activemerchant-1.9.4 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
activemerchant-1.9.3 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
activemerchant-1.9.2 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
n8_activemerchant-1.9.3 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
maedana-activemerchant-1.9.1.1 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
activemerchant-1.9.1 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
johnreitano-activemerchant-1.5.11 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
tomriley-active_merchant-1.4.2.11 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
tomriley-active_merchant-1.4.2.10 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
activemerchant-1.9.0 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
activemerchant-1.8.0 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
smulube-activemerchant-1.7.1.5 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
smulube-activemerchant-1.7.1.4 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
johnreitano-activemerchant-1.5.10 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
activemerchant-1.7.3 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
johnreitano-activemerchant-1.5.9 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
smulube-activemerchant-1.7.1.3 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
glebm-activemerchant-1.7.2.1 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
activemerchant-1.7.2 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb