#Thibaud
1 messages · Page 1 of 1 (latest)
👋 happy to help
thanks to help
what do you mean by "the plugin javascript v3"?
how are you integrating with Stripe?
i use the javascript plugin
who display the card field
but, i am sure that sometimes, the fields don't load.
worst a customer told me, that he had the field, but the button pay was spinning indefinitely
which one?
Checkout Sessions? https://stripe.com/docs/checkout/quickstart
<form id="payment-form"><div id="payment-element"></div><button id="submit"><div class="spinner hidden" id="spinner"></div><span id="button-text">'.$sRLang[369].'</span></button><div id="payment-message" class="hidden"></div></form>
yes the checkout
i use the javascript plugin (for the PCI)
and when people click on the button, some php do the job with the javascript checkout to communicate with your server
but for me, some customer report me that :
the plugin don't display the field card
AND
which integration doc are you following?
when i am on dashboard i can see a lot of attempt where people don't put their card.
but when people arrive on checkout page.
they pay or the left.
or in some case they try and try and try by refresh the page or do again the tunnel to go to checkout
(sorry for my english)
i did my installation 8 months ago and i already sell for 100k € on my account
so it's working, but not at 100%
i used your integration doc : https://stripe.com/docs/payments/quickstart
surely this one. and read the also the api page
@smoky vine please answer my question in order for me to be able to help you out
okay
i used your integration doc :
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
we really can't know what happened on your page since we don't track that, but in all cases do you have any Payment Intent IDs (some examples) to see whether we have anything on record that might help with this
this is really vague @smoky vine
pi_3MgEcwJigHIRTv190Vb9vWfV :: 27 fév - 22:52
pi_3MgOuuJigHIRTv190HqxGhHS :: 28 fév - 09:52
pi_3MgOvmJigHIRTv190VPiQc2f :: 28 fév - 09:53
pi_3MgOvzJigHIRTv190H0B6lPX :: 28 fév - 09:53
4x the same customer. weird behavior for me to refresh 3 times the same page.
he will finish by buy with pi_3MgP1AJigHIRTv190nDOCAsa at 09:59
there are no reason to refresh and restart the cart to try to buy the same product.
pi_3MgENSJigHIRTv190f3xuUmM :: 27 févr. à 22:36
pi_3MgENqJigHIRTv190ncrk6k1 :: 27 févr. à 22:37
pi_3MgOxKJigHIRTv191V6Hq0TH :: 28 févr. à 09:54
pi_3MgY4sJigHIRTv190spKFTfd :: 28 févr. à 19:39
pi_3MgY7NJigHIRTv190mCcqpUk :: 28 févr. à 19:41
pi_3MhC3SJigHIRTv191Hy6ausx :: 2 mars à 14:20
same customer, who came at different time, put the same product on cart
99,9% who can't pay, don't tell us.
the 0.01% we can't do nothing.
it's why i bother you today. i have the feeling that something don't work, and i would like to found a solution
would you mind sharing your code please?
\Stripe\Stripe::setApiKey(STRIPE_SK);
header('Content-Type: application/json');
try {
$paymentIntent = \Stripe\PaymentIntent::create(array(
'amount' => $nPrixStripe,
'currency' => 'eur',
'automatic_payment_methods' => array('enabled' => true),
'description' => 'Order '.$_SESSION['Connected']['Achat']['KeyGen'],
'metadata' => array(
'order_id' => $_SESSION['Connected']['Achat']['KeyGen'],
'idEvent' => $sR['idEvent'],
'idMatch' => $sR['id'],
'idAnnonce' => $_SESSION['Connected']['Achat']['idAnnonce'],
'Quantite' => $_SESSION['Connected']['Achat']['Quantite'],
'idMbr' => $oUser['id'],
'PrixParBillet' => $sRDetail['PrixVente'],
'PrixBillets' => $nPrixBillets,
'TaxeParBillet' => $oUser['PourcentageDossierAchat'],
'PrixDossierParBillet' => $nPrixDossierParBillet,
'PrixDossier' => $nPrixDossier,
'PrixHT' => $nPrixHT,
'TaxeTVA' => $sR['Tva'],
'PrixTVA' => $nPrixTVA,
'PrixTotal' => $nPrixTotal,
),
));
$output = array('clientSecret' => $paymentIntent->client_secret);
echo json_encode($output);
$_SESSION['Connected']['Achat']['idStripe'] = $paymentIntent->id;
}
catch(Error $e) {
http_response_code(500);
echo json_encode(array('error' => $e->getMessage()));
}
exit;
$nPrixStripe => price in cents without . or ,
$_SESSION['Connected']['Achat']['KeyGen'] => my command reference => AABBCCC
yes
here or pastebin ?
doesn't really matter
pastebin because i am limited on char here
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
const { clientSecret } = await fetch("checkout.php?getStripe=1", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ items }),}).then((r) => r.json());
this call the php part i just copy paste
where i can found the missing part to handle the 500s ?
i just download the zip on this page : https://stripe.com/docs/payments/quickstart
and it's the one i use on my website for the checkout.js
without this :
let emailAddress = '';
and
const linkAuthenticationElement = elements.create("linkAuthentication");
linkAuthenticationElement.mount("#link-authentication-element");
const paymentElementOptions = {
layout: "tabs",
};
Hi there 👋 jumping in as my teammate needs to step away, please bear with me a moment while I catch up on the context here.
i complain about the fact that i am sure the javascript plugin not load each time.
i use the checkout system and i follow this doc https://stripe.com/docs/payments/card-element
i give some Payment Intent IDs with date. Because the customer behavior is anormal. Let met think clearly that the plugin don't load.
Your teammate ask me my code and told me i don't handle the 500s error. but I used the .zip shared on the documentation
Alright, let's take a step back. Are you able to reproduce the behavior that you're worried about?
me : no. i am not impacted by the bug
99.9% of customer never complain or report the bug.
and the 0.01% when they do, i can't do nothing.
the behavior by some customer is totaly anormal, it's why i am sure there are a problem
pi_3MgENSJigHIRTv190f3xuUmM :: 27 févr. à 22:36
pi_3MgENqJigHIRTv190ncrk6k1 :: 27 févr. à 22:37
pi_3MgOxKJigHIRTv191V6Hq0TH :: 28 févr. à 09:54
pi_3MgY4sJigHIRTv190spKFTfd :: 28 févr. à 19:39
pi_3MgY7NJigHIRTv190mCcqpUk :: 28 févr. à 19:41
pi_3MhC3SJigHIRTv191Hy6ausx :: 2 mars à 14:20
why came multiple times, restart the cart to put the same product, and never pay ? those who don't have bug came, and they pay or not.
Just to be clear, it sounds like at this point you're guessing that there is a bug, have any of your customers reached out to report it to you?
only one reported it (and not recently). i finish by offer him the product after spent 10 minutes in phone with him and ask him to donwlaod chrome
so yes, i am guessing there are a problem, but nobody report it recently
because the behavior to create multiple cart / basket with the same product without buy is anormal. on my business people do the cart once. they pay it, or they leave. they don't do it multiple time
So have you reached out to the customers to ask why the behaved this way?
i know, i am the worst customer. "hey there are a bug" but i have no element to help or proove it
Nope, not a bad customer, it's just not going to be possible for us to dig in without having an understanding of what we should be looking at or for.
no because i am afraid to show them there are problem or my website is not reliable. but i can do it if you ask me to do it
it is possible that the card element field just don't display ?
You mean the Payment Element?
It's probably possible, did your code catch any errors when trying to create the instance of Stripe or the Payment Element, or did an error get raised when trying to mount the Payment Element?
on my php log i have 0 error
and i dont log the javascript one
tarzan told me before you came : you don't handle the 500s
but i use your code, if you can told me how to handle the 500s i will be happy to do it and try to track eventually problem when the plugin don't display
I took a quick look through the stock javascript file that we provide there, and it does seem to check for errors when confirming payments. If you believe there is another part of the process that is causing problems, then you'll want to add logging for those, and possibly wrap them in try/catch blocks if you think those functions are erroring.
why "you" didnt add this functionality ( check for errors when confirming payments ) on the checkout.js that you share to help dev to integrate your system ?
okay i will try to try / catch every step and come back to you with more detail
To clarify, the provided code does check for errors being returned when confirming a payment. I'm still not clear what part of your process you think is causing problems, whether it's the element not being displayed or a button spinning indefinitely (and if this I'm not sure what button you're referring to or what it is trying to do).
"I took a quick look through the stock javascript file that we provide there, and it does seem to check for errors when confirming payments. "
"To clarify, the provided code does check for errors being returned when confirming a payment"
i use the javascript provide by stripe.
did i understand not correctly or you said the opposite ?
for me the problem can be 2 solutions :
- the plugin (the card input) are not display on my page
OR - the pay button #payment-element who generate a spinner and send a request to stripe server put the spinner but nothing happen (it's what happen to my customer who report me the bug few months ago)
I'm clearly speculating. which may be wrong.
and I thought that maybe other people would complain of the same problem and that you would have answers for me.
There is error handling for confirming a payment, as seen in the example code:
elements,
confirmParams: {
// Make sure to change this to your payment completion page
return_url: "http://localhost:4242/checkout.html",
receipt_email: emailAddress,
},
});
// This point will only be reached if there is an immediate error when
// confirming the payment. Otherwise, your customer will be redirected to
// your `return_url`. For some payment methods like iDEAL, your customer will
// be redirected to an intermediate site first to authorize the payment, then
// redirected to the `return_url`.
if (error.type === "card_error" || error.type === "validation_error") {
showMessage(error.message);
} else {
showMessage("An unexpected error occurred.");
}```
Yup, so your code will catch errors raised when confirming the payment.
because i used your checkout.js download on your zip
but never a stripe customer report you that plugin don't display ?
or that the pay button create a spinning indefinitely ?
I've heard it before, and then we need to get details on how to reproduce so we can get an idea of what is happening. Right now the problem is very vague, it's really not even clear what the problem is (element not loading, a payment button spinning indefinitely, or something else).
for me, the customer came on checkout page, and the input card don't show up
but i have no element to recreate the bug
maybe it's related to the phone / nav / os / security settings
i will try to track it
Yup, it very well could be that the customer was using an unsupported browser.
Any time!