Skip to content

Instantly share code, notes, and snippets.

# cart_controller.rb
def paymentcheckout
@value = "version=2<LF>cdr=0<LF>"
if params['MAC']
oTpe = CMCIC_Tpe.new("FR", checkout_cart_url("fr", 4))
oHmac = CMCIC_Hmac.new(oTpe)
sChaineMAC = [oTpe.sNumero, params["date"], params['montant'], params['reference'], params['texte-libre'], oTpe.sVersion, params['code-retour'], params['cvx'], params['vld'], params['brand'], params['status3ds'], params['numauto'], params['motifrefus'], params['originecb'], params['bincb'], params['hpancb'], params['ipclient'], params['originetr'], params['veres'], params['pares']].join('*') + "*";
#!/usr/bin/ruby
#puts "Content-type: text/plain\n\n"
# *****************************************************************************
#
# "Open source" kit for CM-CIC P@iement (TM)
#
# File "Phase2Retour.rb":
#
@UsinaSites
UsinaSites / gist:3907050
Created October 17, 2012 17:58 — forked from crossblaim/gist:1623116
process paperclip attachments in the background
# == Schema Information
# you need to add a flag to the model to indicate his processing status
# it defaults to true:
#
# attachment_processing :boolean(1) default(TRUE)
# ...
#
#----------------------------------------------------------------------
class Thing < ActiveRecord::Base