Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update stripe-js for Custom Checkout types #479

Merged
merged 4 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading