Response
# File lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb, line 34 def address address = (@params['PaymentDetails']||{})['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
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 30 def contact_phone @params['ContactPhone'] end
# File lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb, line 4 def email info['Payer'] end
# File lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb, line 8 def info (@params['PayerInfo']||{}) end
# File lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb, line 12 def name payer = (info['PayerName']||{}) [payer['FirstName'], payer['MiddleName'], payer['LastName']].compact.join(' ') end
# File lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb, line 25 def payer_country info['PayerCountry'] end
Generated with the Darkfish Rdoc Generator 2.