#newb1-SetupIntents
1 messages · Page 1 of 1 (latest)
throws ajax error
new customer and card attached, but no message of setupintent created and succeeded
am i doing something wrong? not including something in that code?
are you there?
please don't post the your api key even though it's in test mode. You should consider your test key compromised and roll it.
\Stripe\Stripe::setApiKey('sk_test_...');
try {
$customer = \Stripe\Customer::create([
'source' => $_POST[stripeToken],
'description' => $form->getValueText('quform_89_8')
]);
\Stripe\SetupIntents::create([
'customer' => $customer->id,
'payment_method_types' => 'card',
]);
what's the error message?
just says "There was a problem
Ajax error"
are you printing out the full error message?
i'm not following.. printing out?
i can see you have a try block
how are you catching the error?
which line of your code is the error message originating from?
it shows up above the form i have the card elemtn in when i submit a test
should i not be using try?
are you able to share the link to a sample or your test site which I can access to take a look?
your website is in live mode, do you have one that is in test mode?
no
can you share a screenshot of the error? I'm not going to be able to try to replicate it in live mode
how to upload attachment
huh, gues syou have to type text as well to enter
it's not hard to replicate it does the same thing every time
actually i'm not getting that error so it looks like it may be your environment.
can you open the network tab in developer tools and see if there're any requests that are erroring?
i f12 and see red error but just show sthe website url, am i supposed to look somewhere else
you need to select Network in the tabs
this is what i get
i can see that the stripe test form request is in red, are there any other failed requests in there? it'd show in red too
just the one i meantioned i saw first, attached
that's below in console tab
nothing else red in network tab
in stripe dashboard looking at events, i can't tell which ones are you and which ones are me, but none of them have the setupintent created/successful events
test event log past couple hours
looking at the network error, it looks like it's not a Stripe issue actually