class OffsitePayments::Integrations::PoliPay::Notification
See www.polipaymentdeveloper.com/gettransaction#gettransaction_response
Public Class Methods
new(params, options = {})
click to toggle source
# File lib/offsite_payments/integrations/poli_pay.rb, line 202 def initialize(params, options = {}) # POLi nudge uses Token, redirect use token token = params.fetch('Token') { params.fetch('token') } @params = QueryInterface.new(options[:login], options[:password]).call(token) end
Public Instance Methods
acknowledge()
click to toggle source
# File lib/offsite_payments/integrations/poli_pay.rb, line 208 def acknowledge true # always valid as we fetch direct from poli end
complete?()
click to toggle source
# File lib/offsite_payments/integrations/poli_pay.rb, line 212 def complete? @params['TransactionStatusCode'] == 'Completed' end
currency()
click to toggle source
# File lib/offsite_payments/integrations/poli_pay.rb, line 224 def currency @params['CurrencyCode'] end
gross()
click to toggle source
# File lib/offsite_payments/integrations/poli_pay.rb, line 220 def gross @params['AmountPaid'] end
message()
click to toggle source
There is only a message on failure www.polipaymentdeveloper.com/initiate#initiatetransaction_response
# File lib/offsite_payments/integrations/poli_pay.rb, line 238 def message @params['ErrorMessage'] end
order_id()
click to toggle source
# File lib/offsite_payments/integrations/poli_pay.rb, line 228 def order_id @params['MerchantReference'] end
success?()
click to toggle source
# File lib/offsite_payments/integrations/poli_pay.rb, line 216 def success? complete? && gross && gross > 0 end
transaction_id()
click to toggle source
# File lib/offsite_payments/integrations/poli_pay.rb, line 232 def transaction_id @params['TransactionRefNo'] end