#AlexFitFlow

1 messages · Page 1 of 1 (latest)

wraith tokenBOT
atomic kettle
uncut quail
#

Hello! Give me a minute and I'll take a look

#

You need to be setting the custom_text hash when you create the Checkout Session - I don't think you have control over whether it shows up on the left side (I think it'll always show up on the right side since you're only options here are to have it close to the shipping address or the pay/submit button)

atomic kettle
#

I am getting an error message. Why is it not working?

#

ode:25726) UnhandledPromiseRejectionWarning: Error: Received unknown parameter: custom_text[message]
at Function.generate (/Users/alexamiriyan/Desktop/React_E-Commerce/Backend/node_modules/stripe/lib/Error.js:38:24)
at res.toJSON.then.StripeAPIError.message (/Users/alexamiriyan/Desktop/React_E-Commerce/Backend/node_modules/stripe/lib/RequestSender.js:104:43)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
(Use node --trace-warnings ... to show where the warning was created)
(node:25726) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:25726) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

#

@uncut quail

uncut quail
#

@lost trench is around to help you some more, but it's not working because you're not passing us the correct things

atomic kettle
#

It is still not working @lost trench @uncut quail I dont know how to phrase this. The docs are confusing

lost trench
#

Put the submit line inside of the custom_text hash. In other words, copy/paste line 306 to a new line between 303 and 304

atomic kettle
#

Im still getting an error message

#

Should "shipping_address" be changed?

#

@lost trench

lost trench
#

Ah, right. Apologies, I missed that error. Yeah, remove custom_text.shipping_address if you're not also collecting shipping address from the customer during Checkout

atomic kettle
#

custom_text: {
shipping_address: {
submit: {message: 'We'll email you instructions on how to get started.'},
message: 'Please note that we can't guarantee 2-day delivery for PO boxes at this time.',
},
},

#

So how much of this do I keep?

#

Are you saying remove the first and second line?

lost trench
#

custom_text: { submit: { message: 'We'll email you instructions on how to get started.' }, },

atomic kettle
#

Why is this causing issues?

#

Its expected this symbol :?

lost trench
#

Did you save the file and restart the server? Also, can you just copy paste the whole function call into this text so I can just debug on my end?

#

Oh, there's a single quote in the message

#

You need to remove that or use double-quotes to enclose like below

#

custom_text: { submit: { message: "We'll email you instructions on how to get started." }, },

atomic kettle
#

It is working now! One last thing how can I add a line break?

lost trench
#

You can't add line breaks unfortunately

atomic kettle
#

Can I make the text bigger?

#

How much can I customize that text?