Closed gmauro99 closed 2 years ago
This method call Stripe API to retrieve users that have saved Credit Card.
If there is a network slow call you can verify by call this command line :
curl -o /dev/null -s -w 'Total: %{time_total}s\n' https://api.stripe.com/v1/customers \
-u sk_test_VePHdqKTYQjKNInc7u56JBrQ: \
-X "POST"
In my computer "Total: 0.412044s"... that quite long but lower than 1200ms.
No downtime on Stripe https://status.stripe.com/
Having the same issue, the stripe module slows down the cart summary page too much. I'm using PS 1.6.
Hi @testing3-apps
Do you have enabled options "Saving cards" on your PrestaShop backoffice ? If yes, could you try to disable it and compare the load time of the page ?
I try to understand if the issue come from the module or Stripe call. If you have Saving card enabled, the module call Stripe to get information about customer and it could explain that something is wrong with Stripe call.
Yes, I have this option enabled, I'll disable it and provide the result soon.
I tested it, and the results are the same, enabling or disabling the option does not affect the loading time.
It looks like there is no condition (never added) on hookPayment about "save card" feature on Prestashop 1.6 hookPayment ...
Could you please try to return $display
just before this line and check the time (and if all right) ?
https://github.com/202-ecommerce/stripe_official/blob/5631793cf2e3645440ccd2494a0ca431f0615225/stripe_official.php#L1814
Please note, for PrestaShop 1.7, we have this condition : https://github.com/202-ecommerce/stripe_official/blob/5631793cf2e3645440ccd2494a0ca431f0615225/stripe_official.php#L1902
Yes, it reduced the loading time!
It looks like each call on Stripe "cost" between 400ms and 600ms (perhaps 750ms on your server). I've sent a message to Stripe to know if there have register some trouble with some networks.
We will fix the condition (like in PS 1.7) in the next release.
It looks like each call on Stripe "cost" between 400ms and 600ms (perhaps 750ms on your server). I've sent a message to Stripe to know if there have register some trouble with some networks.
We will fix the condition (like in PS 1.7) in the next release.
These response times have been high for over a year, I believe that is their average response times. Obviously the difference between 400 and 750 I think depends on the time of the request and the distance between the servers.
OK thank you @gmauro99
So in a first time, we will add the condition for PS 1.6 to load unnecessary requests in case of save cards feature disabled. But, if the time average is around 500ms, the module couldn't have an impact on Stripe less than 500ms.
Hello,
The loading of module in ajax checkout slows the page of several seconds. I've found that the problem in function of class \Stripe\Account::retrieve(). Commenting, infact, from hookPaymentOptions the checkApiConnection (that uses retrieve) and also the var stripeAccount the loading of scripts are much faster (about 20ms against 1200ms).
I would to know if it depends from stripe's server latency or not and if its possible to increases the speed.
Thank you