Ejemplo n.º 1
0
from paython import api, gateways, CreditCard

api = gateways.Stripe(
    username="******")  #, debug=True)

mycard = {
    'first_name': 'auston',
    'last_name': 'bunsen',
    'number': '4242424242424242',
    'exp_mo': '12',
    'exp_yr': '2012'
}

cc_obj = CreditCard(**mycard)

billing = {
    'address': '7519 NW 88th Terrace',
    'city': 'Tamarac',
    'state': 'FL',
    'zipcode': '33321',
    'phone': '9546703289',
    'email': '*****@*****.**'
}

api.capture('0.22', cc_obj, billing)
ex = api.capture('10.22', cc_obj, billing)
api.credit('5.55', ex['trans_id'])
api.void('2155779779')
Ejemplo n.º 2
0
    sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)))

    # trying again
    from paython import api, gateways, CreditCard

api = gateways.AuthorizeNet(username='******',
                            password='******',
                            test=True)

mycard = {
    'first_name': 'auston',
    'last_name': 'bunsen',
    'number': '4111111111111111',
    'exp_mo': '12',
    'exp_yr': '2012'
}

cc_obj = CreditCard(**mycard)

billing = {
    'address': '7519 NW 88th Terrace',
    'city': 'Tamarac',
    'state': 'FL',
    'zipcode': '33321',
    'phone': '9546703289',
    'email': '*****@*****.**'
}

api.auth('0.22', cc_obj, billing)
api.void('2155779779')
Ejemplo n.º 3
0
from paython import api, gateways, CreditCard

api = gateways.Samurai(merchant_key='202fc9c52312295d8ab93048',
                       password='******',
                       processor='df52fa67def1a3e85a0affce')

mycard = {
    'first_name': 'John',
    'last_name': 'Doe',
    'number': '4111111111111111',
    'exp_mo': '12',
    'exp_yr': '2012',
    'cvv': '111',
    'strict': True
}

cc_obj = CreditCard(**mycard)

billing = {
    'address': '1000 1st Av',
    'city': 'Chicago',
    'state': 'IL',
    'zipcode': '10101',
    'phone': '9546703289',
    'email': '*****@*****.**'
}

authorization = api.auth('1.00', cc_obj, billing)
print authorization
print api.void(authorization['alt_trans_id'])
Ejemplo n.º 4
0
api = gateways.Samurai(
	merchant_key='202fc9c52312295d8ab93048', 
	password='******', 
	processor='df52fa67def1a3e85a0affce'
)

mycard = {
    'first_name': 'John',
    'last_name': 'Doe',
    'number': '4111111111111111',
    'exp_mo': '12',
    'exp_yr': '2012',
    'cvv':'111',
    'strict': True
}

cc_obj = CreditCard(**mycard)

billing = {
    'address': '1000 1st Av',
    'city': 'Chicago',
    'state': 'IL',
    'zipcode': '10101',
    'phone': '9546703289',
    'email': '*****@*****.**'
}

authorization = api.auth('1.00', cc_obj, billing)
print authorization
print api.void(authorization['alt_trans_id'])