Class: ActiveMerchant::Billing::PaypalExpressResponse

Inherits:
Response
  • Object
show all
Defined in:
lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb

Instance Attribute Summary

Attributes inherited from Response

#authorization, #avs_result, #cvv_result, #message, #params, #test

Instance Method Summary collapse

Methods inherited from Response

#fraud_review?, #initialize, #success?, #test?

Constructor Details

This class inherits a constructor from ActiveMerchant::Billing::Response

Instance Method Details

#addressObject



24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb', line 24

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

#emailObject



4
5
6
# File 'lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb', line 4

def email
  @params['payer']
end

#nameObject



8
9
10
# File 'lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb', line 8

def name
  [@params['first_name'], @params['middle_name'], @params['last_name']].compact.join(' ')
end

#payer_countryObject



20
21
22
# File 'lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb', line 20

def payer_country
  @params['payer_country']
end

#payer_idObject



16
17
18
# File 'lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb', line 16

def payer_id
  @params['payer_id']
end

#tokenObject



12
13
14
# File 'lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb', line 12

def token
  @params['token']
end