Skip to content

Commit

Permalink
🐛 (payment) Fix postalCode camel case issue
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno authored and jmgoncalves97 committed Jan 17, 2025
1 parent d65ad1b commit 586f396
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/embeds/js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@typebot.io/js",
"version": "0.1.26",
"version": "0.1.27",
"description": "Javascript library to display typebots on your website",
"type": "module",
"main": "dist/index.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ export const StripePaymentForm = (props: Props) => {
sessionId: props.context.sessionId,
typebot: props.context.typebot,
})
const { postalCode, ...address } =
props.options.additionalInformation?.address ?? {}
const { error, paymentIntent } = await stripe.confirmPayment({
elements,
confirmParams: {
Expand All @@ -69,9 +71,8 @@ export const StripePaymentForm = (props: Props) => {
email: props.options.additionalInformation?.email,
phone: props.options.additionalInformation?.phoneNumber,
address: {
...props.options.additionalInformation?.address,
postal_code:
props.options.additionalInformation?.address?.postalCode,
...address,
postal_code: postalCode,
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion packages/embeds/nextjs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@typebot.io/nextjs",
"version": "0.1.26",
"version": "0.1.27",
"description": "Convenient library to display typebots on your Next.js website",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/embeds/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@typebot.io/react",
"version": "0.1.26",
"version": "0.1.27",
"description": "Convenient library to display typebots on your React app",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down

0 comments on commit 586f396

Please sign in to comment.