Sha256: 2fefdfacba3e881b7b41d0329e31c8c43438b6082c5b476a9b7b52f85f54fa94

Contents?: true

Size: 1013 Bytes

Versions: 22

Compression:

Stored size: 1013 Bytes

Contents

module ActiveMerchant #:nodoc:
  module Billing #:nodoc:
    class PayflowExpressResponse < Response
      def email
        @params['e_mail']
      end

      def full_name
        "#{@params['name']} #{@params['lastname']}"
      end

      def token
        @params['token']
      end

      def payer_id
        @params['payer_id']
      end

      # Really the shipping country, but it is all the information provided
      def payer_country
        address['country']
      end

      def phone
        @params['phone']
      end

      def address
        {  'name'       => @params['shiptoname'] || full_name,
           'company'    => nil,
           'address1'   => @params['street'],
           'address2'   => @params['shiptostreet2'] || @params['street2'],
           'city'       => @params['city'],
           'state'      => @params['state'],
           'country'    => @params['country'],
           'zip'        => @params['zip'],
           'phone'      => phone }
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 3 rubygems

Version Path
activemerchant-1.114.0 lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb
activemerchant-1.113.0 lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb