module CompletePaymentSystems

Constants

CPS
ROOT
VERSION

Attributes

config[RW]

Private Class Methods

configure() { |config| ... } click to toggle source
# File lib/complete_payment_systems.rb, line 25
def self.configure
  self.config ||= Config.new
  yield(config)
end
return_test_instance() click to toggle source
# File lib/complete_payment_systems.rb, line 55
def self.return_test_instance
  hash = {
    order: (Time.now.to_i),            # Pass the unique purchase ID here
    value: "166",                      # Pass the purchase value in cents here (1$ purcase value = 100)
    currency: "USD",    # Pass the purchase currency 3-letter code here ($ = "USD")
    holder_name: "John",               # Ask buyer for this in a form
    holder_surname: "Doe",             # Ask buyer for this in a form
    card_number: "4314229999999913",   # Ask buyer for this in a form
    card_exp: "01/18",                 # Ask buyer for this in a form
    card_cvv: "123",                   # Ask buyer for this in a form
    holder_ip: "123.124.125.226"       # Get this from request.remote_ip
  }

  return CPS::Request.new(hash)

end
root() click to toggle source
# File lib/complete_payment_systems.rb, line 17
def self.root
  ROOT
end