Object
This combines the gross and currency and returns a proper Money object. this requires the money library located at dist.leetsoft.com/api/money
# File lib/active_merchant/billing/integrations/notification.rb, line 32 def amount return Money.new(gross_cents, currency) rescue ArgumentError return Money.new(gross_cents) # maybe you have an own money object which doesn't take a currency? end
reset the notification.
# File lib/active_merchant/billing/integrations/notification.rb, line 38 def empty! @params = Hash.new @raw = "" end
the money amount we received in X.2 decimal.
# File lib/active_merchant/billing/integrations/notification.rb, line 22 def gross raise NotImplementedError, "Must implement this method in the subclass" end
# File lib/active_merchant/billing/integrations/notification.rb, line 26 def gross_cents (gross.to_f * 100.0).round end
# File lib/active_merchant/billing/integrations/notification.rb, line 17 def status raise NotImplementedError, "Must implement this method in the subclass" end
Check if the request comes from an official IP
# File lib/active_merchant/billing/integrations/notification.rb, line 44 def valid_sender?(ip) return true if ActiveMerchant::Billing::Base.integration_mode == :test || production_ips.blank? production_ips.include?(ip) end
Generated with the Darkfish Rdoc Generator 2.