Skip to content

Render offline payment instruction tokens#1235

Open
realicon23 wants to merge 1 commit into
HiEventsDev:developfrom
realicon23:fix-offline-payment-instruction-tokens
Open

Render offline payment instruction tokens#1235
realicon23 wants to merge 1 commit 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant