Sha256: fc35f4ef0e0063430565835883248cb79811f4e989fd6fd4aeaef91515990e54
Contents?: true
Size: 1.31 KB
Versions: 36
Compression:
Stored size: 1.31 KB
Contents
module ActiveMerchant #:nodoc: module Billing #:nodoc: class PaypalExpressResponse < Response def email info['Payer'] end def info (@params['PayerInfo']||{}) end def name payer = (info['PayerName']||{}) [payer['FirstName'], payer['MiddleName'], payer['LastName']].compact.join(' ') end def token @params['Token'] end def payer_id info['PayerID'] end def payer_country info['PayerCountry'] end # PayPal returns a contact telephone number only if your Merchant account profile settings require that the buyer enter one. def contact_phone @params['ContactPhone'] end 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 end end end
Version data entries
36 entries across 36 versions & 10 rubygems