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
activemerchant-est-1.4.2.5 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
patmaddox-activemerchant-1.4.2 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
abtain_billing-1.0 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
activemerchant-1.2.0 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
activemerchant-1.3.2 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
activemerchant-1.2.1 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
activemerchant-1.4.0 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
activemerchant-1.3.1 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
activemerchant-1.3.0 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
activemerchant-1.4.1 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
activemerchant-1.4.2 lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb
spree-0.2.0 vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb