#ubi

1 messages · Page 1 of 1 (latest)

subtle meadowBOT
rose glacier
#
function StripeElements(props: any) {
  return (
    <Elements
      stripe={stripePromise}
      options={{
        mode: 'setup',
        captureMethod: 'manual',
        appearance: {
          variables: {
            colorPrimaryText: primary[500],
            colorPrimary: primary[500],
          },
        },
        paymentMethodCreation: 'manual',
      }}
    >
      {props.children}
    </Elements>
  );
}
light hill
#

Hello there

rose glacier
#

that is what I have thus far, but it is not working, not sure what config I should be doing here

#

@light hill wavey

light hill
#

Hmm you should not need a Price

#

But what do you mean by "not working"?

rose glacier
#

JS Error

light hill
#

The Elements Provider should wrap your checkout form which would contain Payment Element for instance

#

Ah you can't use mode: setup with capture_method: manual

#

Those things are not compatible as you aren't actually creating a payment here at all in mode: setup

rose glacier
#

actually, I added currency with that exact setup and it works WTFF

#

the currency seems to be required

light hill
#

Ah yes currency indeed is required

#

Missed that

#

But yeah the capture_method won't do anything here since doesn't really make sense

#

But guess we don't actually error on that

rose glacier
#

the TypeScript typesepc needs some love

light hill
#

Yeah this stuff is relatively new. I'll take a look at that later and file some feedback

rose glacier
#

I tried to look for the source code to contriubte, but I cant find it

light hill