コード例 #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)
コード例 #2
0
def resend_order_email(*args, **kwargs):
    return OrderVerificationController.resend_order_email(request)
コード例 #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')
コード例 #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)
コード例 #5
0
ファイル: api.py プロジェクト: devsummit/backend
def verify_payment(id, *args, **kwargs):
    user = kwargs['user'].as_dict()
    if user['role_id'] == ROLE['admin']:
        return OrderVerificationController.verify(id, request)
    return 'Unauthorized'