feat: add onCouponCodeChange callback and supportsCouponCode/couponCode config to ApplePay (COSDK-473)#1094
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for Apple Pay coupon codes on iOS 15 and above. It includes updates to the configuration parser, event listeners, and native delegate methods to handle coupon code changes. Feedback includes a correction for a type mismatch in the event listener where an object is passed instead of a string, and a recommendation to improve state management for summary items and shipping methods to prevent data loss during updates.
0c8ce7c to
2dba812
Compare
fd8685e to
7d27e98
Compare
2cbbdb9 to
710c329
Compare
…de config to ApplePay (COSDK-473)
…nt payload (COSDK-473)
…payload (COSDK-473)
…for ApplePay (COSDK-473)
d629845 to
497b93a
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces support for Apple Pay coupon codes, including the necessary configuration updates, native module extensions for iOS, and event handling logic. I have identified two important improvements: the ApplePayError type definition needs to be updated to include 'couponCode' to prevent TypeScript errors, and the currentShippingMethods property should be updated during the coupon code update process to ensure consistency across the payment flow.
…ve applePayError(from:) (COSDK-473)
|


Adds coupon code support to ApplePay (iOS 15+). Merchants can enable the coupon code field via supportsCouponCode, pre-fill it with couponCode, and react to changes via onCouponCodeChange. Auto-resolves with empty update if no callback configured.
Ticket: COSDK-473
Chain: 3/3 — targets
feat/applepay-shipping(PR #1093).