fix: payment_link в письме о новом заказе - #458
Open
Ibochkarev wants to merge 2 commits into
Open
Conversation
StatusChangedNotification now resolves the online payment URL once per notification via PaymentLinkResolver and passes it to email templates. Removes the broken unused OrderStatusService::getPaymentLink helper. Closes #407
Share payStatus parsing and eligibility rules between StatusChangedNotification and ms3_get_order via PaymentLinkResolver. Add PaymentLinkResolverResolveTest with stub handler (no MODX bootstrap).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Описание
После перехода на
NotificationManagerплейсхолдерpayment_linkне заполнялся в письмах о смене статуса заказа (tpl.msEmail.new.customer), хотя шаблон по-прежнему ожидает{$payment_link}.Добавлен
PaymentLinkResolver: для статуса «Новый» (ms3_status_new) резолвит URL черезPaymentService::loadPaymentHandler()иgetPaymentLink().StatusChangedNotificationкэширует результат один раз на уведомление, чтобы не вызывать payment API при каждом обходеgetPlaceholders().Удалён неиспользуемый и сломанный
OrderStatusService::getPaymentLink()(неверный аргумент конструктора payment handler). ВPaymentService::loadPaymentHandler()добавленloadCustomClasses('payment')для кастомных провайдеров.Тип изменений
Связанные Issues
Closes #407
Как это было протестировано?
composer ci:php)Конфигурация тестирования:
Скриншоты (если применимо)
Не применимо (backend / email placeholders).
Чеклист
Дополнительные заметки
ms3_status_new(не final, не paid).PaymentService); security-review — BLOCK/HIGH не найдено.ms3_get_order.php(payStatus).