Skip to content

Commit

Permalink
Update stripe-js for Custom Checkout types (#479)
Browse files Browse the repository at this point in the history
* upgrade rollup

* upgrade nodejs action version

* Bump stripe.js to v3.0.7

---------

Co-authored-by: Madhav Gharmalkar <[email protected]>
  • Loading branch information
danwang-stripe and madhav-stripe authored Mar 8, 2024
1 parent 04982fc commit f10b594
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 @@ -67,7 +67,7 @@
"@rollup/plugin-replace": "^5.0.5",
"@rollup/plugin-terser": "^0.4.4",
"@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 @@ -2300,10 +2300,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 f10b594

Please sign in to comment.