Skip to content

Commit

Permalink
Update stripe-js for Custom Checkout types
Browse files Browse the repository at this point in the history
  • Loading branch information
danwang-stripe committed Mar 4, 2024
1 parent caf1825 commit 147c0ca
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/hooks/11-Custom-Checkout.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const CheckoutForm = () => {
return (
<form onSubmit={handleSubmit}>
<CustomerDetails />
<h3>Payment Dettails</h3>
<h3>Payment Details</h3>
<PaymentElement />
<h3>Billing Details</h3>
<AddressElement options={{mode: 'billing'}} />
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"@babel/preset-env": "^7.7.1",
"@babel/preset-react": "^7.7.0",
"@storybook/react": "^6.5.0-beta.8",
"@stripe/stripe-js": "^2.2.0",
"@stripe/stripe-js": "3.0.7",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.1.1",
"@testing-library/react-hooks": "^8.0.0",
Expand Down
7 changes: 6 additions & 1 deletion src/components/CustomCheckout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,13 @@ export const parseCustomCheckoutSdkContext = (
return ctx;
};

type StripeCustomCheckoutActions = Omit<
Omit<stripeJs.StripeCustomCheckout, 'session'>,
'on'
>;

interface CustomCheckoutContextValue
extends stripeJs.StripeCustomCheckoutActions,
extends StripeCustomCheckoutActions,
stripeJs.StripeCustomCheckoutSession {}
const CustomCheckoutContext = React.createContext<CustomCheckoutContextValue | null>(
null
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2130,10 +2130,10 @@
regenerator-runtime "^0.13.7"
resolve-from "^5.0.0"

"@stripe/stripe-js@^2.2.0":
version "2.2.0"
resolved "https://registry.yarnpkg.com/@stripe/stripe-js/-/stripe-js-2.2.0.tgz#d5eeeae2efa5a9167fd74a047eceef8be3281b55"
integrity sha512-YyXQbsXvnNRJ6MofFhCLIQ4W7UpfkfSOQhjIaHEiCMBv3IBxhzugXiYNNzceGTK/7DL31v7HtTnkJ+FI+6AIow==
"@stripe/stripe-js@3.0.7":
version "3.0.7"
resolved "https://registry.yarnpkg.com/@stripe/stripe-js/-/stripe-js-3.0.7.tgz#ceec7db210830d742c1ba2a697ddaf3a210542af"
integrity sha512-qmjTsxnst84iWDsGqPxk5Wlff/fG4nSFjy/r24t9WWFAlCuvwnuUAe4eGgbqZBng019AtgWvo8wuhM3Y5/olbw==

"@testing-library/dom@^8.5.0":
version "8.13.0"
Expand Down

0 comments on commit 147c0ca

Please sign in to comment.