Skip to content

Instantly share code, notes, and snippets.

View luopio's full-sized avatar

Lauri Kainulainen luopio

View GitHub Profile
@luopio
luopio / gist:f5a58f1dacf94d6094ad
Last active June 17, 2016 15:54 — forked from gnepud/gist:5804215
Generating a Paymill token to test without the Javascript Bridge
module PaymillSupport
def get_payment_token
# Simulate the JavaScript bridge we would use in production
params = {
'transaction.mode' => 'CONNECTOR_TEST',
'channel.id' => Rails.configuration.paymill_public_key,
'jsonPFunction' => 'function',
'account.number' => '4111111111111111',
'account.expiry.month' => 1.year.from_now.month,