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)
def resend_order_email(*args, **kwargs): return OrderVerificationController.resend_order_email(request)
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')
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)
def verify_payment(id, *args, **kwargs): user = kwargs['user'].as_dict() if user['role_id'] == ROLE['admin']: return OrderVerificationController.verify(id, request) return 'Unauthorized'