class ActiveMerchant::Billing::PaypalExpressResponse
Public Instance Methods
address()
click to toggle source
# File lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb, line 39 def address address = (details['ShipToAddress']||{}) { 'name' => address['Name'], 'company' => info['PayerBusiness'], 'address1' => address['Street1'], 'address2' => address['Street2'], 'city' => address['CityName'], 'state' => address['StateOrProvince'], 'country' => address['Country'], 'zip' => address['PostalCode'], 'phone' => (contact_phone || address['Phone']) } end
contact_phone()
click to toggle source
PayPal returns a contact telephone number only if your Merchant account profile settings require that the buyer enter one.
# File lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb, line 35 def contact_phone @params['ContactPhone'] end
details()
click to toggle source
# File lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb, line 12 def details (@params['PaymentDetails']||{}) end
email()
click to toggle source
# File lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb, line 4 def email info['Payer'] end
info()
click to toggle source
# File lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb, line 8 def info (@params['PayerInfo']||{}) end
name()
click to toggle source
# File lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb, line 16 def name payer = (info['PayerName']||{}) [payer['FirstName'], payer['MiddleName'], payer['LastName']].compact.join(' ') end
note()
click to toggle source
# File lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb, line 60 def note @params['note_text'] end
payer_country()
click to toggle source
# File lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb, line 29 def payer_country info['PayerCountry'] end
payer_id()
click to toggle source
# File lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb, line 25 def payer_id info['PayerID'] end
shipping()
click to toggle source
# File lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb, line 53 def shipping shipping = (@params['UserSelectedOptions']||{}) { 'amount' => shipping['ShippingOptionAmount'], 'name' => shipping['ShippingOptionName'] } end
token()
click to toggle source
# File lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb, line 21 def token @params['Token'] end