Sha256: 4786b9672b59a3f00fcdf219d86cd710e52c2693cdd125974a0a009ac6a0398d

Contents?: true

Size: 1022 Bytes

Versions: 15

Compression:

Stored size: 1022 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

15 entries across 15 versions & 2 rubygems

Version Path
activemerchant-1.99.0 lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb
activemerchant-1.98.0 lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb
active_accountability_merchant-1.97.1 lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb
activemerchant-1.97.0 lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb
activemerchant-1.96.0 lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb
activemerchant-1.95.0 lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb
activemerchant-1.94.0 lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb
activemerchant-1.93.0 lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb
activemerchant-1.92.0 lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb
activemerchant-1.91.0 lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb
activemerchant-1.90.0 lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb
activemerchant-1.89.0 lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb
activemerchant-1.88.0 lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb
activemerchant-1.87.0 lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb
activemerchant-1.86.0 lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb