From 0f1b4883fe3a3b65214c4466fabc8a1d41c43fc6 Mon Sep 17 00:00:00 2001 From: Jacqueline Osborn Date: Thu, 11 May 2023 14:49:54 -0400 Subject: [PATCH] Update ECE expressPaymentType --- tests/types/src/valid.ts | 2 +- types/stripe-js/elements/express-checkout.d.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/types/src/valid.ts b/tests/types/src/valid.ts index 41ed15e1..bf570059 100644 --- a/tests/types/src/valid.ts +++ b/tests/types/src/valid.ts @@ -870,7 +870,7 @@ expressCheckoutElement }) => {} ); -expressCheckoutElement.on('confirm', ({paymentFailed}) => { +expressCheckoutElement.on('confirm', ({paymentFailed, expressPaymentType}) => { paymentFailed(); paymentFailed({}); paymentFailed({reason: 'invalid_shipping_address'}); diff --git a/types/stripe-js/elements/express-checkout.d.ts b/types/stripe-js/elements/express-checkout.d.ts index 684b7ce1..9f73525c 100644 --- a/types/stripe-js/elements/express-checkout.d.ts +++ b/types/stripe-js/elements/express-checkout.d.ts @@ -188,7 +188,7 @@ export type StripeExpressCheckoutElement = StripeElementBase & { ): StripeExpressCheckoutElement; }; -export type PaymentMethodType = 'google_pay' | 'apple_pay' | 'link'; +export type ExpressPaymentType = 'google_pay' | 'apple_pay' | 'link' | 'paypal'; export type ExpressCheckoutPartialAddress = { city: string; @@ -420,7 +420,7 @@ export interface StripeExpressCheckoutElementClickEvent { /** * The payment method associated with the button that was clicked. */ - paymentMethodType: PaymentMethodType; + expressPaymentType: ExpressPaymentType; /** * Callback to configure the details shown on a payment interface, including which fields to collect. @@ -443,7 +443,7 @@ export interface StripeExpressCheckoutElementConfirmEvent { shippingRate?: ShippingRate; - paymentMethodType: PaymentMethodType; + expressPaymentType: ExpressPaymentType; } export type ChangeResolveDetails = {