Skip to content

Commit

Permalink
Update ECE expressPaymentType (#448)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackieosborn-stripe authored May 16, 2023
1 parent fe413e4 commit 6615f4a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/types/src/valid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ expressCheckoutElement
}) => {}
);

expressCheckoutElement.on('confirm', ({paymentFailed}) => {
expressCheckoutElement.on('confirm', ({paymentFailed, expressPaymentType}) => {
paymentFailed();
paymentFailed({});
paymentFailed({reason: 'invalid_shipping_address'});
Expand Down
6 changes: 3 additions & 3 deletions types/stripe-js/elements/express-checkout.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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.
Expand All @@ -443,7 +443,7 @@ export interface StripeExpressCheckoutElementConfirmEvent {

shippingRate?: ShippingRate;

paymentMethodType: PaymentMethodType;
expressPaymentType: ExpressPaymentType;
}

export type ChangeResolveDetails = {
Expand Down

0 comments on commit 6615f4a

Please sign in to comment.