Beispiel #1
0
def payment_status():
    company_id = request.args.get('company_id')

    event_id = Company.find(company_id).event_id

    flag = Payment.check_for_payment(event_id, company_id)

    return jsonify({"payment": flag})
Beispiel #2
0
def list_companies():
    event_id = request.args.get('event_id')

    Event.add_visitor(event_id)

    companies = Company.get_companies_sp_list(event_id)

    active_companies = []
    for company in companies:
        if Event.find(event_id).subscriptable:
            if Payment.check_for_payment(event_id, company.id):
                active_companies.append(company.to_dict())
        else:
            active_companies.append(company.to_dict())

    print(active_companies)

    return jsonify(active_companies)