Title: [287660] trunk/Source/WebKit
Revision
287660
Author
drou...@apple.com
Date
2022-01-05 16:49:21 -0800 (Wed, 05 Jan 2022)

Log Message

REGRESSION(r285521): `errors` provided to `ApplePaySession.prototype.completeCouponCodeChange` are ignored
https://bugs.webkit.org/show_bug.cgi?id=234893
<rdar://problem/86780827>

Reviewed by Tim Horton.

* Platform/cocoa/PaymentAuthorizationPresenter.mm:
(WebKit::PaymentAuthorizationPresenter::completeCouponCodeChange):
Make sure to actually set the `errors` of the `PKPaymentRequestCouponCodeUpdate` using the
`errors` inside `ApplePayShippingMethodUpdate`. This was accidentally removed in r285521.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (287659 => 287660)


--- trunk/Source/WebKit/ChangeLog	2022-01-06 00:25:14 UTC (rev 287659)
+++ trunk/Source/WebKit/ChangeLog	2022-01-06 00:49:21 UTC (rev 287660)
@@ -1,3 +1,16 @@
+2022-01-05  Devin Rousso  <drou...@apple.com>
+
+        REGRESSION(r285521): `errors` provided to `ApplePaySession.prototype.completeCouponCodeChange` are ignored
+        https://bugs.webkit.org/show_bug.cgi?id=234893
+        <rdar://problem/86780827>
+
+        Reviewed by Tim Horton.
+
+        * Platform/cocoa/PaymentAuthorizationPresenter.mm:
+        (WebKit::PaymentAuthorizationPresenter::completeCouponCodeChange):
+        Make sure to actually set the `errors` of the `PKPaymentRequestCouponCodeUpdate` using the
+        `errors` inside `ApplePayShippingMethodUpdate`. This was accidentally removed in r285521.
+
 2022-01-05  Tim Horton  <timothy_hor...@apple.com>
 
         Move more SDK checks to linkedOnOrAfter()

Modified: trunk/Source/WebKit/Platform/cocoa/PaymentAuthorizationPresenter.mm (287659 => 287660)


--- trunk/Source/WebKit/Platform/cocoa/PaymentAuthorizationPresenter.mm	2022-01-06 00:25:14 UTC (rev 287659)
+++ trunk/Source/WebKit/Platform/cocoa/PaymentAuthorizationPresenter.mm	2022-01-06 00:49:21 UTC (rev 287660)
@@ -291,6 +291,7 @@
     }
 
     auto couponCodeUpdate = adoptNS([PAL::allocPKPaymentRequestCouponCodeUpdateInstance() initWithPaymentSummaryItems:WebCore::platformSummaryItems(WTFMove(update->newTotal), WTFMove(update->newLineItems))]);
+    [couponCodeUpdate setErrors:toNSErrors(WTFMove(update->errors)).get()];
 #if HAVE(PASSKIT_DEFAULT_SHIPPING_METHOD)
     [couponCodeUpdate setAvailableShippingMethods:toPKShippingMethods(WTFMove(update->newShippingMethods))];
 #else
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to