Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: fb26be4eafff34b547db17ea687379119f61fbf8
https://github.com/WebKit/WebKit/commit/fb26be4eafff34b547db17ea687379119f61fbf8
Author: Chris Dumez <[email protected]>
Date: 2026-07-29 (Wed, 29 Jul 2026)
Changed paths:
M Source/WebKit/Platform/cocoa/PaymentAuthorizationPresenter.mm
Log Message:
-----------
Apple Pay deferred payment request is dropped when changing payment method
https://bugs.webkit.org/show_bug.cgi?id=320541
Reviewed by Gerald Squelart.
`PaymentAuthorizationPresenter::completePaymentMethodSelection()` set the
deferred payment request on the PKPaymentRequestPaymentMethodUpdate *after*
handing the update to the delegate via `completePaymentMethodSelection:`. That
delegate call is synchronous and consuming: WKPaymentAuthorizationDelegate
immediately invokes PassKit's stored completion block with the update object
`(std::exchange(_didSelectPaymentMethodCompletion, nil)(update.get()))`. By the
time `setDeferredPaymentRequest:` ran, PassKit had already consumed the object,
so the deferred payment request was silently dropped for payment-method
selection.
All three sibling handlers (completeShippingContactSelection,
completeShippingMethodSelection, completeCouponCodeChange) set the deferred
payment request *before* their `complete...:` call; the payment-method path was
the sole outlier with inverted ordering. Every other property in
`completePaymentMethodSelection()` is likewise set before the delegate call.
Move the `setDeferredPaymentRequest:` block ahead of the
`completePaymentMethodSelection:` call so the deferred payment terms are
applied before PassKit consumes the update.
* Source/WebKit/Platform/cocoa/PaymentAuthorizationPresenter.mm:
(WebKit::PaymentAuthorizationPresenter::completePaymentMethodSelection):
Canonical link: https://commits.webkit.org/318155@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications