class OffsitePayments::Integrations::Chronopay::Notification
Public Instance Methods
# File lib/offsite_payments/integrations/chronopay.rb, line 274 def acknowledge(authcode = nil) true end
The customer's city
# File lib/offsite_payments/integrations/chronopay.rb, line 221 def city params['city'] end
# File lib/offsite_payments/integrations/chronopay.rb, line 129 def complete? status == 'Completed' end
The customer's country - 3 digit country code
# File lib/offsite_payments/integrations/chronopay.rb, line 216 def country params['country'] end
The currency the purchase was made in
# File lib/offsite_payments/integrations/chronopay.rb, line 261 def currency params['currency'] end
Additional parameter
# File lib/offsite_payments/integrations/chronopay.rb, line 251 def custom2 params['cs2'] end
Additional parameter
# File lib/offsite_payments/integrations/chronopay.rb, line 256 def custom3 params['cs3'] end
Unique ID of customer
# File lib/offsite_payments/integrations/chronopay.rb, line 165 def customer_id params['customer_id'] end
Date of transaction in MM/DD/YYYY format
# File lib/offsite_payments/integrations/chronopay.rb, line 191 def date params['date'] end
The customer's email address
# File lib/offsite_payments/integrations/chronopay.rb, line 206 def email params['email'] end
the money amount we received in X.2 decimal.
# File lib/offsite_payments/integrations/chronopay.rb, line 266 def gross params['total'] end
The item id passed in the first custom parameter
# File lib/offsite_payments/integrations/chronopay.rb, line 246 def item_id params['cs1'] end
Language
# File lib/offsite_payments/integrations/chronopay.rb, line 180 def language params['language'] end
The customer's full name
# File lib/offsite_payments/integrations/chronopay.rb, line 201 def name params['name'] end
Customer's password for restricted access zone of Merchant’s Web-site, as chosen
# File lib/offsite_payments/integrations/chronopay.rb, line 241 def password params['password'] end
ID of a product that was purchased
# File lib/offsite_payments/integrations/chronopay.rb, line 175 def product_id params['product_id'] end
# File lib/offsite_payments/integrations/chronopay.rb, line 184 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
Unique ID of Merchant’s web-site
# File lib/offsite_payments/integrations/chronopay.rb, line 170 def site_id params['site_id'] end
The customer's state. Only useful for US Customers
# File lib/offsite_payments/integrations/chronopay.rb, line 231 def state params['state'] end
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 thatPaypal
sends. SeePaypal::Notification#status
for more details
# File lib/offsite_payments/integrations/chronopay.rb, line 146 def status case params['transaction_type'] when 'onetime' 'Completed' when 'refund' 'Refunded' when 'chargeback' 'Reversed' else 'Failed' end end
The customer's street address
# File lib/offsite_payments/integrations/chronopay.rb, line 211 def street params['street'] end
# File lib/offsite_payments/integrations/chronopay.rb, line 270 def test? date.blank? && time.blank? && transaction_id.blank? end
Time of transaction in HH:MM:SS format
# File lib/offsite_payments/integrations/chronopay.rb, line 196 def time params['time'] end
Unique ID of transaction
# File lib/offsite_payments/integrations/chronopay.rb, line 160 def transaction_id params['transaction_id'] end
Customer’s login for restricted access zone of Merchant’s Web-site
# File lib/offsite_payments/integrations/chronopay.rb, line 236 def username params['username'] end
The customer's zip
# File lib/offsite_payments/integrations/chronopay.rb, line 226 def zip params['zip'] end