Skip to content

Accept PayPal webhooks on the core notify endpoint - #814

Merged
GSadee merged 1 commit into
Sylius:phase-2-payment-requestsfrom
rust-le:feature/SY-842-notify-provider
Oct 19, 2026
Merged

GSadee merged 1 commit into
Sylius:phase-2-payment-requestsfrom
rust-le:feature/SY-842-notify-provider

Conversation

@rust-le

@rust-le rust-le commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor
Q A
Branch? phase-2-payment-requests
Bug fix? no
New feature? yes
BC breaks? no
Related tickets SY-842

The plugin takes webhooks on its own /paypal-webhook/api/ endpoint, verifies every signature with the first PayPal payment method and finds the payment by the PayPal order id alone.

Sylius' /payment-methods/{code} notify route now takes PayPal webhooks too. PayPalNotifyPaymentProvider verifies the signature with the webhook of the method in the URL and finds the payment by the Payment Request hash PayPal was given as custom_id, then by the PayPal order or capture id; the payment has to belong to that method. A signature it cannot verify is answered 404, an event about no payment of that method 204. NotifyPaymentRequestHandler claims the event id in the store from #813, so a duplicate or parallel delivery changes nothing, reads the event's resource again from PayPal and hands it to the processor tagged for its event type. The processors come in the next PR, so for now every event is recorded as ignored; the old endpoint is unchanged and PayPal keeps sending to it until the webhooks are re-registered.

@rust-le
rust-le force-pushed the feature/SY-842-notify-provider branch 3 times, most recently from d3ed967 to 83d5011 Compare October 15, 2026 11:25
@rust-le
rust-le force-pushed the feature/SY-842-notify-provider branch from 83d5011 to fe10368 Compare October 16, 2026 06:36
@rust-le
rust-le marked this pull request as ready for review October 16, 2026 06:36
@GSadee GSadee added the Feature label Oct 16, 2026
@rust-le
rust-le force-pushed the feature/SY-842-notify-provider branch from fe10368 to 7c35ef6 Compare October 16, 2026 11:03
…ethod

Sylius' /payment-methods/{code} route now takes PayPal webhooks.
PayPalNotifyPaymentProvider verifies the signature with the webhook of the
method in the URL, not with the first PayPal method, and finds the payment by
the Payment Request hash PayPal was given as custom_id, then by the PayPal
order or capture id; the payment has to belong to that method. A signature it
cannot verify is answered 404 and an event about no payment of that method 204,
by PaymentMethodNotifyAction decorating the core action.

NotifyPaymentRequestHandler claims the event id in the processed-event store,
so a duplicate or parallel delivery changes nothing, reads the event's resource
again from PayPal with the method's credentials and hands it to the processor
registered for its event type; an event without one is recorded as ignored and
a permanent failure fails the Payment Request. The processors themselves come
in the next PR.
@rust-le
rust-le force-pushed the feature/SY-842-notify-provider branch from 7c35ef6 to fb247e0 Compare October 19, 2026 07:10
@GSadee
GSadee merged commit f3dedee into Sylius:phase-2-payment-requests Oct 19, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants