#coraelstraze_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1427196468695142430
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Could i clarify what these "fake buttons" might be?
Simple DOM element (picture) of button
That do nothing but show that you can click on them
And firstly I wanna know if 5Mb is ok for initializing this type of button. Or I do smth wrong
hmmm, could you provide us with your ecommerce url where these buttons can be found?
Just to let you know, Payment Request Buttons are a legacy integration, Stripe has a new Express Checkout Element which allows you to accept card or wallet payments through one or more payment buttons
Here are the docs if you decide to migrate: https://docs.stripe.com/elements/express-checkout-element/migration
It is CS-Cart platform that uses your integration. Here is demo - https://dev.demo.mv.cs-cart.com/stores/461184a46e9a69dc/apparel/mens-clothing/t-shirt-color-black/
Wait some time for button to show
Google pay
Can Express Checkout Element be used on product page also? For example if you click on "View all variations" button, we need buttons to be shown for each variation (see prscr)
For each of the products listed in this modal, you only want one type of payment method to show? e.g. Allow them to pay via GooglePay only
No, all buttons should show. Right now its Google/Apple Pay that are available by CS-Cart. No more
By "all buttons" I mean all that are available. For example one client decides to show only GooglePay, another - to show ApplePay and maybe one more.
Since it is a platform and we give clients availability to customize their product pages and checkouts
I just wanna know maximum available features we can give without performance problems
๐ Hey, taking over here, just taking a look
As you're using CS-Cart, it's difficult to say how exactly this integration would work. It would be best to talk directly to the CS-Cart folks
No you did not understand. I'm representative of CS-Cart dev team
I'm not a user, I am working on refactoring of code for this buttons
Ah, I see. Looking at the screenshot above, it looks like there will need to be multiple instances of the element which is probably going to add a lot of overhead. This would likely apply to a Express Checkout Element integration too.
What you're describing is possible though, you can configure the parameters controlling what buttons show on each instance: https://docs.stripe.com/js/elements_object/create_express_checkout_element#express_checkout_element_create-options-paymentMethods
I was thinking about this, and multiple instances is really the problem that leaded me to dig this.
The paymentRequest object https://docs.stripe.com/js/payment_request can be updated. So I was thinking to do 1 instance on a group "key+country+currency", and updating it on click trigger.
This works, but still 1 instance takes 5-6Mb of page resources. Becase without Stripe buttons page weight is 3-6Mb. And with button its 10-12 Mb
I was trying to find out could 1 instance be lighter than 5-6 Mb on page load
So you say that Express Checkout Element FULLY replaces "paymentRequest object" and has same features and more? And can be used not only on checkout but on product pages?
Have you seen what specific requests are responsible for these amounts of resources?
Yes, the paymentRequest is object is fully deprecated and replaced by ECE
There may be less customization options for the buttons, however, if that's what you're currently making use of
Biggest ones are these and I suppose that Google Chrome also adds hidden resources of js.stripe to calculation
I don't see any big requests in the screenshot - are those requests repeated for every instance? In general though, with regard to the Stripe code, there's nothing that you can really do to decrease or selectively download, and we just wrap the wallet code from Google/Apple, so again the amount of resources that will need to be downloaded is static
Ok thank you!
So basically your answers are:
- Resources for 1 button instance can not be decreased
- You recommend to migrate to ECE
Is that right?
Could you give more info about paymentRequest object. Since it is deprecated, does it mean that in closest future it can be fully removed from API?
Yes, that's correct
I'm not aware of any immediate plans to fully remove it, but our advice is definitely not to use it for any new integrations and for existing ones, it's best to migrate to ECE
Got it. Thanks for your answers!