Module: OffsitePayments::Integrations::Paxum::Common
- Included in:
- Helper, Notification
- Defined in:
- lib/offsite_payments/integrations/paxum.rb
Instance Method Summary collapse
Instance Method Details
#generate_signature ⇒ Object
47 48 49 |
# File 'lib/offsite_payments/integrations/paxum.rb', line 47 def generate_signature Digest::MD5.hexdigest(generate_signature_string) end |
#generate_signature_string ⇒ Object
36 37 38 39 40 41 42 43 44 45 |
# File 'lib/offsite_payments/integrations/paxum.rb', line 36 def generate_signature_string @raw_post.slice!(0) if @raw_post.start_with?("&") @raw_post = CGI.unescape(@raw_post) @raw_post = "&#{@raw_post}" unless @raw_post.start_with?("&") arr = @raw_post.split('&') arr.delete(arr.last) data = arr.join('&') (data + secret) end |