Skip to content

Render offline payment instruction tokens#1235

Merged
daveearley merged 2 commits into
HiEventsDev:developfrom
realicon23:fix-offline-payment-instruction-tokens
Jul 8, 2026
Merged

Render offline payment instruction tokens#1235
daveearley merged 2 commits into
HiEventsDev:developfrom
realicon23:fix-offline-payment-instruction-tokens

Conversation

@realicon23

Copy link
Copy Markdown
Contributor

Summary

  • render offline payment instructions with the public order context so organizers can include references like {{ order.number }}
  • re-sanitize rendered instructions before returning them to the checkout UI
  • prefer the order-loaded event payload on the payment page so tokenized instructions appear before the offline payment transition

Scope

This addresses the order-reference/template part of #1216. It intentionally does not redesign the wider offline-only checkout flow in the same PR.

Verification

  • /opt/homebrew/opt/php@8.4/bin/php backend/vendor/bin/phpunit backend/tests/Unit/Resources --no-coverage
  • /opt/homebrew/opt/php@8.4/bin/php -l on touched PHP files
  • git diff --check
  • touched-file secret pattern scan

Offline payment instructions can include order-specific references in organizer configuration, but public checkout resources were returning the stored template verbatim. That left buyers seeing unreplaced Liquid tokens and prevented organizers from matching bank transfers to orders.

Render the instructions only when the public event settings resource has both event and order context, reusing the existing order-confirmation token builder so checkout and email references stay consistent. Purify the rendered HTML before returning it, and fall back to the stored instructions if rendering fails.

Also prefer the order-loaded event payload on the payment page so the offline payment method receives the resource that contains order-aware settings.
@realicon23 realicon23 force-pushed the fix-offline-payment-instruction-tokens branch from a21e3a7 to 185333e Compare July 3, 2026 09:47
Move Liquid rendering out of the public resources into
OfflinePaymentInstructionsRenderService and EmailTokenContextBuilder so
tokens render consistently on checkout, ticket lookup, and all order
emails (custom template and default). Add a token dropdown to the
offline payment instructions editor.
@daveearley

Copy link
Copy Markdown
Contributor

Thank you for these changes!

@daveearley daveearley merged commit 6eb1709 into HiEventsDev:develop Jul 8, 2026
4 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants