class Powerpay21
Main class for Powerpay21
API
Constants
- URL_HASH
Constants - URLs
Public Class Methods
help()
click to toggle source
# File lib/powerpay21.rb, line 43 def self.help puts "This is a Powerpay21 API. Check our website for Guide" end
new(merchantid, secret, live=false)
click to toggle source
# File lib/powerpay21.rb, line 32 def initialize(merchantid, secret, live=false) @merchantid=merchantid @secret=secret if live @live_demo=:live else @live_demo=:demo end end
Public Instance Methods
calculate_signature(params)
click to toggle source
Calculates the SHA1Sum signature for give param hash by sorting the keys in ascending order
# File lib/powerpay21.rb, line 59 def calculate_signature(params) raw_string = "" params.sort.each do |key,value| raw_string += value end sha1 = Digest::SHA1.new sha1 << raw_string return sha1.hexdigest || "" end
cancel()
click to toggle source
# File lib/powerpay21.rb, line 85 def cancel end
capture()
click to toggle source
# File lib/powerpay21.rb, line 76 def capture end
cft()
click to toggle source
# File lib/powerpay21.rb, line 82 def cft end
refund()
click to toggle source
# File lib/powerpay21.rb, line 79 def refund end
status()
click to toggle source
# File lib/powerpay21.rb, line 88 def status end