class Stall::Cmcic::FakeGatewayPaymentNotification
Public Instance Methods
params()
click to toggle source
# File lib/stall/cmcic/fake_gateway_payment_notification.rb, line 8 def params {}.tap do |params| params.merge!(options) params['MAC'] = bank_mac_key end end
Private Instance Methods
bank_mac_key()
click to toggle source
# File lib/stall/cmcic/fake_gateway_payment_notification.rb, line 46 def bank_mac_key @bank_mac_key ||= cic_payment.response_mac(options) end
cic_payment()
click to toggle source
# File lib/stall/cmcic/fake_gateway_payment_notification.rb, line 50 def cic_payment @cic_payment ||= Stall::Cmcic::CicPayment.new(gateway) end
format_date(date)
click to toggle source
# File lib/stall/cmcic/fake_gateway_payment_notification.rb, line 17 def format_date(date) date.strftime("%d/%m/%Y_a_%H:%M:%S") end
options()
click to toggle source
# File lib/stall/cmcic/fake_gateway_payment_notification.rb, line 21 def options @options ||= { 'TPE' => Stall::Cmcic::Gateway.tpe, 'date' => format_date(Time.now), 'montant' => price_with_currency(cart.total_price), 'reference' => transaction_id, 'texte-libre' => cart.reference, 'code-retour' => "payetest", 'cvx' => "oui", 'vld' => "1219", 'brand' => "na", 'status3ds' => "-1", 'numauto' => 'xxxx', 'motifrefus' => "", 'originecb' => "00x", 'bincb' => "000001", 'hpancb' => "F6FBF44A7EC30941DA2E411AA8A50C77F174B2BB", 'ipclient' => "01.01.01.01", 'originetr' => "FRA", 'veres' => "", 'pares' => "", 'modepaiement' => "CB" } end