I hereby claim:
- I am mjallday on github.
- I am mjallday (https://keybase.io/mjallday) on keybase.
- I have a public key whose fingerprint is 5043 3C86 AAD6 968F 3D28 8F98 F439 FD97 E280 4455
To claim this, I am signing this object:
#!/bin/python | |
""" | |
A simple directory watching script that will compute the checksum for all files | |
within a path and execute a change when the sum changes. | |
This will not work well with large files as it reads the entire file into | |
memory. | |
""" | |
import argparse |
response_codes = { | |
'201': 'Invalid CC Account Number', | |
'202': 'Bad Amount, Non-Numeric Amount', | |
'203': 'Zero Amount', | |
'204': 'Other Error', | |
'205': 'Bad Total Auth Amount', | |
'218': 'Invalid SKU Number', | |
'219': 'Invalid Credit Plan', | |
'220': 'Invalid Store Number', |
#!/usr/bin/env python | |
from __future__ import unicode_literals | |
import pymongo | |
import threading | |
DB_NAME = 'events' | |
COLLECTION_NAME = 'events' | |
class Subscriber(threading.Thread): |
I hereby claim:
To claim this, I am signing this object:
require 'balanced' | |
# create an api key and marketplace for example purposes only. | |
# in real-life you only do this once by the dashboard. | |
api_key = Balanced::ApiKey.new.save | |
Balanced.configure(api_key.secret) | |
marketplace = Balanced::Marketplace.new.save | |
# create a bank account. this is normally done with balanced.js |
import newrelic.agent | |
import time | |
import logging | |
logging.basicConfig() | |
logger = logging.getLogger('newrelic') | |
logger.setLevel(logging.DEBUG) | |
newrelic.agent.initialize('newrelic.ini', environment='staging') | |
newrelic.agent.register_application(timeout=10.0) |
card.debit(amount)
, bank_account.credit(amount)
is now favoured over customer.debit(card, amount)
FAILED
state. E.g. debiting a card with insufficient funds will result in a transaction with a FAILED
state. These are filtered out of the API by default but can be specifically retrieved with a state filter e.g. /credits?state=failed
curl https://api.balancedpayments.com/debits -XPOST -u ak-test-2yK59ihwoOOk0S6wsg77iMGzLGnGxiohB: -d "source[number]=4444444444444448" -d "source[expiration_month]=12" -d "source[expiration_year]=2016" -d amount=100
{
"errors": [
{
"status": "Payment Required",
"category_code": "card-declined",
"additional": "Account Frozen",
"status_code": 402,
curl http://api.balancedpayments.com/debits -XPOST -u ak-test-2DBryLFR3BBam1CipbWEGSO6gqVOBKghP: -d "source[number]=4111111111111111" -d "source[expiration_month]=12" -d "source[expiration_year]=2016" -d amount=100
{
"debits": [
{
"status": "succeeded",
"description": null,
"links": {
"customer": "CU6wJUpqcVWf2JwgyfIsRy1z",
curl 'http://127.0.0.1:8000/images' -H 'Origin: http://127.0.0.1:8000' -H 'Accept-Encoding: gzip,deflate,sdch' -H 'Host: 127.0.0.1:8000' -H 'Accept-Language: en-US,en;q=0.8' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.69 Safari/537.36' -H 'Content-Type: application/json' -H 'Accept: application/json, text/javascript, */*; q=0.01' -H 'Referer: http://127.0.0.1:8000/' -H 'X-Requested-With: XMLHttpRequest' -H 'Connection: keep-alive' --data-binary '{"name":"Balanced","src":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAQCAMAAADDNnYVAAAAmVBMVEVXWFpfYGJpaWtycnR7e32EhIaNjY+Wlpefn6CipA+mqB2oqKmxsbKztUS6uru8vV/AwW3Dw8TExXvFxnvJyojMzMzR0qPV1dXW1rHa2r7e3t7e38zj49nmpRLmqR/mrSzmrS3msTnnyonnzpfn1rLn27/n38zn49rn5+fox8Xo0tDqk43qnZjqqKTriIHrk43tU0ntXlTuPzMyENYEAAACeklEQVR42q2VC5PTIBDHIUCghquiRhQ9H3enx/k4td//w7nLApvUpDPO+J+W7oNkfyQLFQ+/T4+56d3Tw9UbMq0mmSn29BH8UO0Z