Class/Module Index [+]

Quicksearch

ActiveMerchant::Billing::Integrations::WorldPay::Notification

Public Instance Methods

account() click to toggle source
# File lib/active_merchant/billing/integrations/world_pay/notification.rb, line 10
def account
  params['instId']
end
acknowledge() click to toggle source
# File lib/active_merchant/billing/integrations/world_pay/notification.rb, line 109
def acknowledge
  return true
end
address() click to toggle source
# File lib/active_merchant/billing/integrations/world_pay/notification.rb, line 54
def address
  params['address']
end
address_status() click to toggle source
# File lib/active_merchant/billing/integrations/world_pay/notification.rb, line 101
def address_status
  return avs_value_to_symbol(params['AVS'][2].chr)
end
card_type() click to toggle source
# File lib/active_merchant/billing/integrations/world_pay/notification.rb, line 78
def card_type
  params['cardType']
end
complete?() click to toggle source
# File lib/active_merchant/billing/integrations/world_pay/notification.rb, line 6
def complete?
  status == 'Completed'
end
country() click to toggle source
# File lib/active_merchant/billing/integrations/world_pay/notification.rb, line 62
def country
  params['country']
end
country_status() click to toggle source
# File lib/active_merchant/billing/integrations/world_pay/notification.rb, line 105
def country_status
  return avs_value_to_symbol(params['AVS'][3].chr)
end
currency() click to toggle source
# File lib/active_merchant/billing/integrations/world_pay/notification.rb, line 37
def currency
  params['authCurrency']
end
custom_params() click to toggle source

WorldPay supports the passing of custom parameters through to the callback script

# File lib/active_merchant/billing/integrations/world_pay/notification.rb, line 114
def custom_params
  return @custom_params ||= read_custom_params
end
cvv_status() click to toggle source

WorldPay extended fraud checks returned as a 4 character string

1st char: Credit card CVV check
2nd char: Postcode AVS check
3rd char: Address AVS check
4th char: Country comparison check

Possible values are:

:not_supported   -  0
:not_checked     -  1
:matched         -  2
:not_matched     -  4
:partial_match   -  8
# File lib/active_merchant/billing/integrations/world_pay/notification.rb, line 93
def cvv_status
  return avs_value_to_symbol(params['AVS'][0].chr)
end
email_address() click to toggle source
# File lib/active_merchant/billing/integrations/world_pay/notification.rb, line 74
def email_address
  params['email']
end
fax_number() click to toggle source
# File lib/active_merchant/billing/integrations/world_pay/notification.rb, line 70
def fax_number
  params['fax']
end
gross() click to toggle source

the money amount we received in X.2 decimal.

# File lib/active_merchant/billing/integrations/world_pay/notification.rb, line 33
def gross
  params['authAmount']
end
item_id() click to toggle source
# File lib/active_merchant/billing/integrations/world_pay/notification.rb, line 14
def item_id
  params['cartId']
end
name() click to toggle source
# File lib/active_merchant/billing/integrations/world_pay/notification.rb, line 50
def name
  params['name']
end
phone_number() click to toggle source
# File lib/active_merchant/billing/integrations/world_pay/notification.rb, line 66
def phone_number
  params['tel']
end
postcode() click to toggle source
# File lib/active_merchant/billing/integrations/world_pay/notification.rb, line 58
def postcode
  params['postcode']
end
postcode_status() click to toggle source
# File lib/active_merchant/billing/integrations/world_pay/notification.rb, line 97
def postcode_status
  return avs_value_to_symbol(params['AVS'][1].chr)
end
received_at() click to toggle source

Time this payment was received by the client in UTC time.

# File lib/active_merchant/billing/integrations/world_pay/notification.rb, line 23
def received_at
  Time.at(params['transTime'].to_i / 1000).utc
end
security_key() click to toggle source

Callback password set in the WorldPay CMS

# File lib/active_merchant/billing/integrations/world_pay/notification.rb, line 28
def security_key
  params['callbackPW']
end
status() click to toggle source
# File lib/active_merchant/billing/integrations/world_pay/notification.rb, line 46
def status
  params['transStatus'] == 'Y' ? 'Completed' : 'Cancelled'
end
test?() click to toggle source

Was this a test transaction?

# File lib/active_merchant/billing/integrations/world_pay/notification.rb, line 42
def test?
  params.key?('testMode') && params['testMode'] != '0'
end
transaction_id() click to toggle source
# File lib/active_merchant/billing/integrations/world_pay/notification.rb, line 18
def transaction_id
  params['transId']
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.