@ErikHabr

Юmoney http-уведомления работают с localhost?

Отправляю запрос http-уведомлений на 127.0.0.1:8000/api/auth/yoomoney-notification
Кто то скажет, с localhost будет работать или нет?
Почта api@yoomoney.ru бесполезная, на нее не отправляются письма как будто несуществующая почта.

Заодно вот мой код для проверки (python/django)
class YooMoneyHttpNotificationAPIView(APIView):

    def post(self, request):
        print(request)
        line_notification_options = '%s&%s&%s&%s&%s&%s&%s&%s&%s' % (
            request.POST['notification_type'],
            request.POST['operation_id'],
            request.POST['amount'],
            request.POST['currency'],
            request.POST['datetime'],
            request.POST['sender'],
            request.POST['codepro'],
            YANDEX_MONEY_SECRET_WORD,
            request.POST['label'])

        if request.POST['sha1_hash'] == hashlib.sha1(line_notification_options.encode()).hexdigest():
            print("all good")
            return Response({"data": line_notification_options}, status=200)
        print("all bad")
        return Response({}, status=400)
  • Вопрос задан
  • 212 просмотров
Решения вопроса 1
Нет
Ответ написан
Комментировать
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы