This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 -u | |
#coding=utf-8 | |
""" | |
Listens for incoming requests on given port (default 8080). Acts on POST requests | |
by looking for a matching path in the config file (default webhooker.config). | |
Example config: | |
deploy_my_cool_project: /home/dude/deploy_the_stuff.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, |