From f95dc7235a03a7876717bb873cc5c850b3cabd8d Mon Sep 17 00:00:00 2001 From: himanshu-bolt Date: Tue, 14 Jul 2026 11:50:21 +0530 Subject: [PATCH] fix(apple-pay): forward card expiry in webview onComplete result --- src/__tests__/ApplePayWebView.test.tsx | 4 +++- src/payments/ApplePayWebView.tsx | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/__tests__/ApplePayWebView.test.tsx b/src/__tests__/ApplePayWebView.test.tsx index 55e5455..2132cee 100644 --- a/src/__tests__/ApplePayWebView.test.tsx +++ b/src/__tests__/ApplePayWebView.test.tsx @@ -117,7 +117,9 @@ describe('ApplePayWebView — envelope unwrapping', () => { bin: '411111', last4: '1111', network: 'visa', - expiration: '2027-12', + // The iframe posts the raw tokenizer result (TokenizeApplePayResult), + // whose expiry field is `expiry` — not `expiration`. + expiry: '2027-12', }, billingContact: { givenName: 'Jane', diff --git a/src/payments/ApplePayWebView.tsx b/src/payments/ApplePayWebView.tsx index 55390a1..2452f9a 100644 --- a/src/payments/ApplePayWebView.tsx +++ b/src/payments/ApplePayWebView.tsx @@ -159,7 +159,7 @@ export const ApplePayWebView = ({ bin: tokenResult?.bin as string | undefined, last4: tokenResult?.last4 as string | undefined, network: tokenResult?.network as string | undefined, - expiration: tokenResult?.expiration as string | undefined, + expiration: tokenResult?.expiry as string | undefined, boltReference: typeof message.boltReference === 'string' ? message.boltReference