Home
Vingd purchase example.
from datetime import datetime, timedelta from vingd import Vingd v = Vingd(username="test@knopso.com", password="123", endpoint="https://api.vingd.com/sandbox/broker/v1/", frontend="http://www.sandbox.vingd.com/") oid = v.create_object("My test object", "http://localhost:666/") order = v.create_order(oid, 200, datetime.now()+timedelta(days=1)) print "Authorize here:", order['urls']['redirect'] tid = raw_input("After authorization, enter the Token ID: ") purchase = v.purchase_verify(oid, tid) commit = v.purchase_commit(purchase['purchaseid'], purchase['transferid'])