#howard9075_api

1 messages ยท Page 1 of 1 (latest)

onyx lotusBOT
static cloudBOT
#

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.

onyx lotusBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1252956870151508028

๐Ÿ“ Have more to share? Add details, code, screenshots, videos, etc. below.

sturdy bear
#

this is the availablePaymentMethods on ready event:

{
    "googlePay": false,
    "applePay": false,
    "paypal": true,
    "link": true,
    "demoPay": false,
    "amazonPay": false
}
#

GG Pay is available when i used Payment Request Button

oblique ermine
#

hi there!

#

can you share a URL so I can view the issue?

sturdy bear
#

You can check it here

oblique ermine
#

thanks! give me a few minutes to look into this.

marsh widget
#

that page doesn't seem to work in general for me, maybe it only works in local dev

sturdy bear
marsh widget
#

makes sense. Can you get me a working link to a page that uses the ExpressCheckoutElement and isn't showing Google Pay, so I can try to debug it?

sturdy bear
marsh widget
#

still just broken

sturdy bear
#

I'm sorry for the inconvinient, I just dev on my local, and using proxy to foward to my local, so it load quite slowly, can you give it some refresh, please

#

and you shoud use gg chrome

marsh widget
#

what is 'gg chrome'?

sturdy bear
#

I mean google chrome

marsh widget
#

I see

#

ok well it's not working for me overall so let's put that aside.

Can you share the complete code of how you initialise the Stripe library and create and mount the ExpressCheckoutElement?

sturdy bear
#
 const elements = this.getStripe().elements({
            mode: 'payment',
            amount: this.getAmountInCent(this.checkout.amount),
            currency: this.currency?.toLowerCase(),
        }) 
const expressPaymentElement = elements.create('expressCheckout', {
            paymentMethods: {
                "googlePay": "always",
                "applePay": "always",
                "link": "auto",
                "paypal": "auto",
            }
        })

        expressPaymentElement.mount(container)

        expressPaymentElement.on('loaderror', ({error}) => {
            console.log('loaderror', error)
            ready({buttonFailed: true})
        })

        expressPaymentElement.on('escape', (event) => {
            console.log('escape', event)
        })
#

I just use the minimum codes

marsh widget
#

how does getStripe work? where is the global Stripe object initialised?

sturdy bear
#

ya, it get the global Stripe instance

marsh widget
#

can you explain how/show me how the Stripe instance is created/initialised?

marsh widget
# sturdy bear

that page is not hosted on HTTPS, so Google Pay won't appear, that is normal.

sturdy bear
#

its https I am using mkcert to make my ssl my local

marsh widget
#

is it actually https:// in the URL bar though?

sturdy bear
#

as you can see here if I switch back to the code using Payment Request button, the GG Pay appear

marsh widget
#

ok. So going back to it โ€” can you explain how/show me how the Stripe instance is created/initialised?
what publishable key are you using, are you using Stripe Connect?

sturdy bear
#

The stripe instance is init on boostrap, I am not using Stripe Connect

#

Can we have a google meet or some thing similar, I can show you my code and my screen

marsh widget
#

not really no

sturdy bear
#

I am using: "@stripe/stripe-js": "^2.2.2",.
This is how I init stripe:

const stripeJs = import('@stripe/stripe-js');
  const loadStripe = (await stripeJs).loadStripe;
  const stripe = await loadStripe(stripeMethod.public_key, {
    stripeAccount: stripeMethod.connected_account,
  });
marsh widget
#

you are using Connect then?

#

stripeAccount: stripeMethod.connected_account, is how you initialise the library when using Direct Charges on Connect.

#

what is the value (acct_xxx) of the account you're passing? does that account have Google Pay turned on in their settings?

sturdy bear
#

My platform also have options for connect but this payment method is not connect account, I assure

marsh widget
#

ok

#

I don't really know what else to check here really without a link to the site that I can try and replicate this problem on. If you can host the site on a server somewhere and let us have a look we can try and figure it out! there's too many possibilities here to rule out right now.

sturdy bear
#

I sorry about that, I will deploy my code soon, Can I reach out you later when my code got deployed

marsh widget
#

sure, you can open a new thread at that point if it's a while later!

#

ah actually probably not today as it's a holdiay in the US so my colleagues won't be staffing the channel

sturdy bear
#

Thank you so much for your patient

#

ok, thank you again