Class: ActiveMerchant::Billing::PayflowExpressResponse

Inherits:
Response
  • Object
show all
Defined in:
lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb

Instance Attribute Summary

Attributes inherited from Response

#authorization, #avs_result, #cvv_result, #emv_authorization, #error_code, #message, #params, #test

Instance Method Summary collapse

Methods inherited from Response

#fraud_review?, #initialize, #success?, #test?

Constructor Details

This class inherits a constructor from ActiveMerchant::Billing::Response

Instance Method Details

#addressObject



29
30
31
32
33
34
35
36
37
38
39
# File 'lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb', line 29

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

#emailObject



4
5
6
# File 'lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb', line 4

def email
  @params['e_mail']
end

#full_nameObject



8
9
10
# File 'lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb', line 8

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

#payer_countryObject

Really the shipping country, but it is all the information provided



21
22
23
# File 'lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb', line 21

def payer_country
  address['country']
end

#payer_idObject



16
17
18
# File 'lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb', line 16

def payer_id
  @params['payer_id']
end

#phoneObject



25
26
27
# File 'lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb', line 25

def phone
  @params['phone']
end

#tokenObject



12
13
14
# File 'lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb', line 12

def token
  @params['token']
end