@api_view(['POST'])
@permission_classes((AllowAny,))
def sig_check(request):
 issued_at = calendar.timegm(time.gmtime())
 req = {'iss': settings.APP_PURCHASE_KEY, 'typ': settings.SIG_CHECK_TYP, 'aud': settings.APP_PURCHASE_AUD, 'iat': issued_at, 'exp': (issued_at + 3600), 'request': {}}
 return Response({'sig_check_jwt': sign_webpay_jwt(req)}, status=201)

@ api_view ( [ 'POST' ] ) @ permission_classes ( ( AllowAny , ) ) def sig_check ( request ) : issued_at = calendar . timegm ( time . gmtime ( ) ) req = { 'iss' : settings . APP_PURCHASE_KEY , 'typ' : settings . SIG_CHECK_TYP , 'aud' : settings . APP_PURCHASE_AUD , 'iat' : issued_at , 'exp' : ( issued_at + 3600 ) , 'request' : { } } return Response ( { 'sig_check_jwt' : sign_webpay_jwt ( req ) } , status = 201 )
returns a signed jwt to use for signature checking .