Exemplo n.º 1
0
def order_verification_id(id, *args, **kwargs):
    if (request.method == 'GET'):
        return OrderVerificationController.show(id, request)
    elif (request.method == 'PUT' or request.method == 'PATCH'):
        return OrderVerificationController.update(id, request)
    else:
        return OrderVerificationController.delete(id)
Exemplo n.º 2
0
def resend_order_email(*args, **kwargs):
    return OrderVerificationController.resend_order_email(request)
Exemplo n.º 3
0
def verify_payment(id, *args, **kwargs):
    user = kwargs['user'].as_dict()
    if user['role_id'] == ROLE['admin']:
        return OrderVerificationController.verify(id, request)
    return Response(json.dumps({'message': 'unauthorized'}), status=401, mimetype='application/json')
Exemplo n.º 4
0
def order_verification_general (*args, **kwargs):
    user = kwargs['user'].as_dict()
    if (request.method == 'GET'):
        return OrderVerificationController.index(request, user)
    else:
        return OrderVerificationController.create(request)
Exemplo n.º 5
0
def verify_payment(id, *args, **kwargs):
    user = kwargs['user'].as_dict()
    if user['role_id'] == ROLE['admin']:
        return OrderVerificationController.verify(id, request)
    return 'Unauthorized'