Class/Module Index [+]

Quicksearch

ActiveMerchant::Billing::Integrations::Chronopay::Notification

Public Instance Methods

acknowledge() click to toggle source
# File lib/active_merchant/billing/integrations/chronopay/notification.rb, line 151
def acknowledge
  true
end
city() click to toggle source

The customer’s city

# File lib/active_merchant/billing/integrations/chronopay/notification.rb, line 98
def city
  params['city']
end
complete?() click to toggle source
# File lib/active_merchant/billing/integrations/chronopay/notification.rb, line 6
def complete?
  status == 'Completed'
end
country() click to toggle source

The customer’s country - 3 digit country code

# File lib/active_merchant/billing/integrations/chronopay/notification.rb, line 93
def country
  params['country']
end
currency() click to toggle source

The currency the purchase was made in

# File lib/active_merchant/billing/integrations/chronopay/notification.rb, line 138
def currency
  params['currency']
end
custom2() click to toggle source

Additional parameter

# File lib/active_merchant/billing/integrations/chronopay/notification.rb, line 128
def custom2
  params['cs2']
end
custom3() click to toggle source

Additional parameter

# File lib/active_merchant/billing/integrations/chronopay/notification.rb, line 133
def custom3
  params['cs3']
end
customer_id() click to toggle source

Unique ID of customer

# File lib/active_merchant/billing/integrations/chronopay/notification.rb, line 42
def customer_id
  params['customer_id']
end
date() click to toggle source

Date of transaction in MM/DD/YYYY format

# File lib/active_merchant/billing/integrations/chronopay/notification.rb, line 68
def date 
  params['date']
end
email() click to toggle source

The customer’s email address

# File lib/active_merchant/billing/integrations/chronopay/notification.rb, line 83
def email
  params['email']
end
gross() click to toggle source

the money amount we received in X.2 decimal.

# File lib/active_merchant/billing/integrations/chronopay/notification.rb, line 143
def gross
  params['total']
end
item_id() click to toggle source

The item id passed in the first custom parameter

# File lib/active_merchant/billing/integrations/chronopay/notification.rb, line 123
def item_id
  params['cs1']
end
language() click to toggle source

Language

# File lib/active_merchant/billing/integrations/chronopay/notification.rb, line 57
def language
  params['language']
end
name() click to toggle source

The customer’s full name

# File lib/active_merchant/billing/integrations/chronopay/notification.rb, line 78
def name
  params['name']
end
password() click to toggle source

Customer’s password for restricted access zone of Merchant’s Web-site, as chosen

# File lib/active_merchant/billing/integrations/chronopay/notification.rb, line 118
def password
  params['password']
end
product_id() click to toggle source

ID of a product that was purchased

# File lib/active_merchant/billing/integrations/chronopay/notification.rb, line 52
def product_id
  params['product_id']
end
received_at() click to toggle source
# File lib/active_merchant/billing/integrations/chronopay/notification.rb, line 61
def received_at
  # Date should be formatted "dd-mm-yy" to be parsed by 1.8 and 1.9 the same way
  formatted_date = Date.strptime(date, "%m/%d/%Y").strftime("%d-%m-%Y")
  Time.parse("#{formatted_date} #{time}") unless date.blank? || time.blank?
end
site_id() click to toggle source

Unique ID of Merchant’s web-site

# File lib/active_merchant/billing/integrations/chronopay/notification.rb, line 47
def site_id 
  params['site_id']
end
state() click to toggle source

The customer’s state. Only useful for US Customers

# File lib/active_merchant/billing/integrations/chronopay/notification.rb, line 108
def state
  params['state']
end
status() click to toggle source

Status of transaction. List of possible values:

onetime – one time payment has been made, no repayment required;

initial – first payment has been made, repayment required in corresponding period;

decline – charge request has been rejected;

<tt>rebill – repayment has been made together with initial transaction;</ttt>

cancel – repayments has been disabled;

expire – customer’s access to restricted zone membership has been expired;

refund – request to refund has been received;

chargeback – request to chargeback has been received.

This implementation of Chronopay does not support subscriptions. The status codes used are matched to the status codes that Paypal sends. See Paypal::Notification#status for more details

# File lib/active_merchant/billing/integrations/chronopay/notification.rb, line 23
def status
  case params['transaction_type']
  when 'onetime'
    'Completed'
  when 'refund'
    'Refunded'
  when 'chargeback'
    'Reversed'
  else
    'Failed'
  end
end
street() click to toggle source

The customer’s street address

# File lib/active_merchant/billing/integrations/chronopay/notification.rb, line 88
def street
  params['street']
end
test?() click to toggle source
# File lib/active_merchant/billing/integrations/chronopay/notification.rb, line 147
def test?
  date.blank? && time.blank? && transaction_id.blank?
end
time() click to toggle source

Time of transaction in HH:MM:SS format

# File lib/active_merchant/billing/integrations/chronopay/notification.rb, line 73
def time
  params['time']
end
transaction_id() click to toggle source

Unique ID of transaction

# File lib/active_merchant/billing/integrations/chronopay/notification.rb, line 37
def transaction_id
  params['transaction_id']
end
username() click to toggle source

Customer’s login for restricted access zone of Merchant’s Web-site

# File lib/active_merchant/billing/integrations/chronopay/notification.rb, line 113
def username
  params['username']
end
zip() click to toggle source

The customer’s zip

# File lib/active_merchant/billing/integrations/chronopay/notification.rb, line 103
def zip
  params['zip']
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.