#msy_code

1 messages ยท Page 1 of 1 (latest)

marble moonBOT
#

๐Ÿ‘‹ 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/1357454981694885949

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

bleak isle
#

Hello, can you tell me more about what is happening here? Are we throwing an error when you pass us those options?

exotic wagon
#

Well I'm getting no type-hinting from Visual studio code

#

I haven't tried to just pass them in anyway

bleak isle
#

Can you try doing this anyway and see what happens? There are a lot of ways for intellisense to get out of sync with what is actually available

marble moonBOT
exotic wagon
#

One second, let me see if there are any load errors

#

I don't really get anything back other than a CORS error (when passing in the options that aren't available in the intellisense):

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://www.sandbox.paypal.com/xoplatform/logger/api/logger?disableSetCookie=true. (Reason: CORS request did not succeed). Status code: (null).

bleak isle
#

So the buttonTheme and wallets options are in autocomplete and work, but any other options make the ECE not show up at all?

bleak isle
#

And if you remove those params again does the CORS error stay? I wouldn't expect those options to be able to affect anything CORS-wise

exotic wagon
bleak isle
#

Is this test site publicly accessible? Those options are working for me currently and are not causing any errors like that

exotic wagon
#

Unfortunately not, I only have it as a local environment.

Can I verify if we have matching stripe versions?

    "@stripe/react-stripe-js": "^3.1.1",
    "@stripe/stripe-js": "^1.29.0",
bleak isle
#

We aren't but that wouldn't effect what parameters are available or the CORS requirement in this case. If you can resolve the CORS error around the paypal sandbox, that may get the element to show. My guess is that one of those settings effects the paypal button's behavior. Can you try setting paypal to never to see if getting rid of that gets rid of the CORS error temporarily?

exotic wagon
#
          options={{
            emailRequired: true,
            buttonTheme: { applePay: "black", googlePay: "black" },
            wallets: {
              applePay: "always",
              googlePay: "always",
              paypal: "never",
            },
            layout: { maxColumns: 2, maxRows: 2 },
          }}

It didn't stop the CORS error from showing, but I managed to get this:

Also note that the paypal parameter is also errored in the intellisense.

#
{
  "error": {
    "code": "parameter_missing",
    "doc_url": "https://stripe.com/docs/error-codes/parameter-missing",
    "message": "Missing required param: is_shipping_required.",
    "param": "is_shipping_required",
    "type": "invalid_request_error"
  }
}

delicate canopy
#

Hi there! I'll be stepping in for Pompey here

#

that looks like a server-side error - where is it being surfaced? what action?

exotic wagon
#

This is my onConfirm, if that's what you mean

delicate canopy
#

That will work - did you log out any objects from that request? Like a PaymentIntent id?

exotic wagon
delicate canopy
#

PaymentIntent would be enough

exotic wagon
#

I don't think it runs onConfirm

exotic wagon
delicate canopy
#

That's okay - can I have your account id or literally any object id created on that account?

delicate canopy
exotic wagon
delicate canopy
#

Yeah unfortunately those calls are not making it to us

exotic wagon
exotic wagon
#

There are only failed scenarios there

delicate canopy
#

Did you try a random/fake email address?

exotic wagon
#

Yep

delicate canopy
#

You are using testmode API keys, right?

exotic wagon
#

Yeah they are all prefixed with sk_test/pk_test, from my sandbox environment

marble moonBOT
sullen bone
#

๐Ÿ‘‹ Stepping in for my teammate here, give me a few minutes to catch up

exotic wagon