Commit Graph

8 Commits

Author SHA1 Message Date
Matt Van Horn
aa3fa59a32 fix(spec): include order number in webhook_service_spec expected data
The webhook_payload now includes :number in the order slice, but
webhook_service_spec still expected the order hash without it. Since
hash_including only matches at the top level, the nested order hash
comparison was strict and failed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 18:05:49 -07:00
Matt Van Horn
544f62dbc5 feat(payments): add order number to webhook payload
Include the order number in the webhook payload so consumers can
identify which order a payment notification belongs to.

Fixes #13858
2026-03-18 00:12:23 -07:00
Maikel Linke
dcb6f4676d Remove all unnecessary spec_helper require statements
The `.rspec` file is doing this for us.
2026-01-21 12:35:34 +11:00
Gaetan Craig-Riou
584b976dff Per review, small code improvment 2025-12-10 10:28:12 +11:00
Gaetan Craig-Riou
d7505bcef4 Add Payments::WebhookPayload to manage payload data
It includes test data so any change in the payload should not affect
the test webhook enpoint functionality
2025-12-10 10:28:12 +11:00
Gaetan Craig-Riou
f6a7225c47 Per review, remove the ensure 2025-12-10 10:28:12 +11:00
Gaetan Craig-Riou
a38023475c Trigger payment webhook when a payment status changes
It used ActiveSupport::Notifications and a listener :
StatusChangedListenerService to trigger the WebhookService
2025-12-10 10:28:11 +11:00
Gaetan Craig-Riou
4a6ba29b99 Add Payments::WebhookService
It enqueues jobs to post the generated payload to the various configured
webhook endpoints for payment status change
2025-12-10 10:28:11 +11:00