def make_wallet(mangopay_user_id): w = Wallet() w.Owners = [mangopay_user_id] w.Description = 'test wallet' w.Currency = 'EUR' w.save() return w
def make_wallet(mangopay_user_id): w = Wallet() w.Owners = [mangopay_user_id] w.Description = 'test wallet' w.Currency = 'EUR' w.save() return w
def create_wallet(db, participant, currency): w = Wallet() w.Owners = [participant.mangopay_user_id] w.Description = str(participant.id) w.Currency = currency w.save() return db.one(""" INSERT INTO wallets (remote_id, balance, owner, remote_owner_id) VALUES (%s, %s, %s, %s) RETURNING * """, (w.Id, w.Balance, participant.id, participant.mangopay_user_id))
def create_wallet(db, participant, currency): w = Wallet() w.Owners = [participant.mangopay_user_id] w.Description = str(participant.id) w.Currency = currency w.save() return db.one(""" INSERT INTO wallets (remote_id, balance, owner, remote_owner_id) VALUES (%s, %s, %s, %s) RETURNING * """, (w.Id, w.Balance, participant.id, participant.mangopay_user_id))
def create_wallet(db, participant): w = Wallet() w.Owners = [participant.mangopay_user_id] w.Description = str(participant.id) w.Currency = 'EUR' w.save() db.run(""" UPDATE participants SET mangopay_wallet_id = %s WHERE id = %s """, (w.Id, participant.id)) participant.set_attributes(mangopay_wallet_id=w.Id) return w.Id