module OffsitePayments::Integrations::Przelewy24

Public Class Methods

make_amount(price) click to toggle source
# File lib/offsite_payments/integrations/przelewy24.rb, line 42
def self.make_amount(price)
  price.present? ? (price.to_f.round(2) * 100).to_i : 0
end
notification(post, options = {}) click to toggle source
# File lib/offsite_payments/integrations/przelewy24.rb, line 46
def self.notification(post, options = {})
  Notification.new(post)
end
return(query_string, options = {}) click to toggle source
# File lib/offsite_payments/integrations/przelewy24.rb, line 50
def self.return(query_string, options = {})
  Return.new(query_string)
end
service_url() click to toggle source
# File lib/offsite_payments/integrations/przelewy24.rb, line 16
def self.service_url
  mode = OffsitePayments.mode

  case mode
  when :production
    self.production_url
  when :test
    self.test_url
  else
    raise StandardError, "Integration mode set to an invalid value: #{mode}"
  end
end
verification_url() click to toggle source
# File lib/offsite_payments/integrations/przelewy24.rb, line 29
def self.verification_url
  mode = OffsitePayments.mode

  case mode
  when :production
    self.production_verification_url
  when :test
    self.test_verification_url
  else
    raise StandardError, "Integration mode set to an invalid value: #{mode}"
  end
end