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 a3a0ae3
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 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
4 changes: 2 additions & 2 deletions 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 Expand Up @@ -100,7 +100,7 @@
"rollup-plugin-terser": "^5.1.2",
"ts-jest": "^25.1.0",
"ts-loader": "^6.2.1",
"typescript": "^3.7.5"
"typescript": "^4.9.5"
},
"resolutions": {
"@types/react": "18.0.5"
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
16 changes: 8 additions & 8 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 Expand Up @@ -11765,10 +11765,10 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=

typescript@^3.7.5:
version "3.9.7"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa"
integrity sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==
typescript@^4.9.5:
version "4.9.5"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a"
integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==

ua-parser-js@^0.7.22:
version "0.7.33"
Expand Down

0 comments on commit a3a0ae3

Please sign in to comment.