#akakmmm_api

1 messages · Page 1 of 1 (latest)

spring sapphireBOT
#

👋 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/1489238455736074302

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

austere onyx
#

这个loading是我们做的,用来等待加载link按钮的

humble pier
austere onyx
# austere onyx

This loading is what we made, used to wait for the loading of the link button

#

Under normal circumstances, this button should be loaded. Could you please tell me under what circumstances it might not be loaded

humble pier
#

Is this the Express Checkout Element?

austere onyx
#

是的

#

Yes

humble pier
#

and it's not loading on your website?

#

do you see any errors in the browser console?

austere onyx
#

I can provide you with the website link. Could you ask your front-end colleagues to take a look

humble pier
#

yes feel free to send a link where I can reproduce the issue

austere onyx
#

Log in with a Google account, and then proceed to the shopping cart

humble pier
#

can you share a test email/password?

austere onyx
#

This is a real website, and there is no test account

humble pier
#

but can you create an account and share the email/password here?

#

I can't create account to test your website for privacy reasons.

austere onyx
#

Can you log in directly using your Google account

humble pier
#

no sorry

austere onyx
#

Abc123...com

humble pier
#

thanks

#

I'm logged in. now what should I do?

austere onyx
humble pier
#

Got it. I also see the element loading:

austere onyx
#

Yes, it's because we can't load the link that we keep getting this prompt

humble pier
#

and can you share the code you are using for the Express Checkout Element?

austere onyx
humble pier
#

thanks, looking into this

spring sapphireBOT
queen gale
#

Hello, I'm taking over for soma who had to step away. Please give me a few minutes to catch up 🙂

#

At first glance, I don't see anything wrong with the code you shared. Where is the loading logic? Is there a chance the code to mount the Express Checkout Element is not being executed?

austere onyx
#

你可以去到那个网站吗

queen gale
#

Sorry, we can only provide support in English on Discord. Is that still okay?

austere onyx
#

Can you go to that website?

queen gale
#

Yes, I was able to reproduce the issue. I'm wondering if the code you shared that mounts the Express Checkout Element never executes. What does your code for the loading spinner look like?

austere onyx
#

Our front-end colleagues are currently offline. Could you view it through the page instead?

queen gale
#

I'm sorry but there is a lot of Javascript code and I'm not sure where to look. You'll need to point me to where the loading logic you built is.

#

You can also add console.log lines before and after expressCheckoutElement.mount('#express-checkout-element'); in the code you shared to see if that is actually executing. If not, the problem is likely with your loading logic.

austere onyx
#

Are there any other directions for investigation?

#

Tomorrow, let's have the front-end team investigate this issue in this direction. We are using the same codebase. It works fine for other websites, but not for this particular one - it fails to load.

queen gale
#

This thread will close after some time of inactivity. When your team is able to test, I'd recommend verifying that your code to mount the Express Checkout Element actually runs. You can even temporarily remove your loading logic to be sure of this. If it works, this isn't a Stripe issue so you'll need to debug the loading logic to see why it's not properly calling the payinsiderStripe function. If there's still an issue without the loading logic, such as the Express Checkout Element rendering or handling events incorrectly, feel free to reach out again and we will investigate 🙂

austere onyx
#

hold on

#

please

queen gale
#

That code is for initializing Elements, mounting the Express Checkout Element, and defining it's handlers which all looks normal. But I don't see logic for your loading spinner.

austere onyx
spring sapphireBOT
austere onyx
#

function loadScript(url) {
return new Promise((resolve, reject) => {
// 检查是否已加载
if (document.querySelector(script[src="${url}"])) {
resolve();
return;
}

                const script = document.createElement('script');
                script.src = url;
                script.type = 'text/javascript';

                // 成功加载
                script.onload = () => {
                    resolve(script);
                };

                // 加载失败
                script.onerror = () => {
                    reject(new Error(`Failed to load script: ${url}`));
                };

                document.head.appendChild(script);
            });
        }
quartz totem
#

Hi there
Taking over as Jazz needs to step away soon

#

I looked at the website you shared and I see following:

Are you currently updating your site?

quartz totem
#

Same thing on that link

#

You may need to work with your front end folks to dig into your own code.

So far, this doesn't seem like a Stripe.js issue but more so related to how you're integrating it.

One thing I'd recommend is to load Stripe.js on page load rather than waiting on some event to load Stripe.js script. This can create issues with Elements life cycle

austere onyx
quartz totem
#

Sorry I can't read that

austere onyx
quartz totem
#

Yeah I see the spinner now but I don't see any error/logs from Stripe.js suggesting it being a Stripe issue.

As I mentioned earlier, try loading Stripe.js on page/website load rather than it loading on an event trigger

austere onyx
#

Since the loading of the link is triggered only under certain conditions, I would like to ask why we use the same set of code, while other websites don't? Could it be because of the problem with the website?

quartz totem
#

Maybe but I can't say for certain because right now there are no errors/logs

First step here would be to narrow down the scope of the investigation and see if that makes a difference. The fastest way to narrow down would be to remove the loading spinner and event based Stripe.js loading to see if your code loads the Express Checkout Element or if it throws any errors in an attempt to do that

austere onyx
#

Could other front-end colleagues help take a look at this issue?

quartz totem
#

I mean since this is your site and your code, you'd need to work with your team to investigate further and provide more details on why you think this is an issue with Stripe

I'm happy to help dig further but you need to try a few things first so that we can eliminate potential causes

austere onyx
#

Since this website belongs to our merchants, we have two merchants using our link with the same code. It works on Merchant A but not on Merchant B. So we would like to check if there is any conflict with Stripe.

quartz totem
#

Do you have the two merchant account IDs you're testing with?
acct_xx

austere onyx
#

I can't see this. Maybe it's not related to the ID? I was still able to wake up normally yesterday.

quartz totem
#

sorry not sure what you mean by that

austere onyx
#

Yesterday, I could still access the link using the same ID, but today it doesn't work anymore.

quartz totem
#

It's possible that the account turned off the supported payment mehods in their payment method settings

austere onyx
#

\OK, thank you for your support. We'll try the default import of js first tomorrow.

quartz totem
#

Taking a step back since this thread has gone on for a while without any fruitful investigation:

There could be various reasons behind why Express Checkout Element is not loading on your site for this merchant including

  • Integration of Stripe.js is flawed/incorrect
  • Merchant account has turned off supported payment methods in their settings
  • Your code is somewhat different for both merchants
  • Something else

There's no simple way to figure out which one is it without trying out a few things on your end. In order to do that, you need to work with your frontend team to investigate and eliminate potential causes.

My team on discord can help you think and work through integration issues once you have enough clarity on what's going wrong.