import sys
import chargeover
import pprint
endpoint =
username =
password =
key_auth = False
co = chargeover.ChargeOver(
endpoint,
username,
password,
key_auth = key_auth)
data = {
'customer_id': 71,
'number': "1234 5678 9101 1121",
'expdate_year': '2017',
'expdate_month': '05',
'phone': '616-867-5309',
'name': 'Bob Dobbs',
'address': '123 E TheWay Drive',
'city': 'Chicago',
'state': 'IL',
'postcode': '60606',
'country': 'United States'
}
id = co.create('creditcard', data)
if id is None:
pprint.pprint(co.get_last_response())
exit()
else:
print("New creditcard ID is: " + str(id))