#yoshinori hisakawa

1 messages · Page 1 of 1 (latest)

brave martenBOT
empty ether
strange remnant
#

On the front end, when I specify confirmPayment, should I also specify billing_details?

empty ether
#

yep, that's right

strange remnant
#
    const { error } = await stripe.confirmPayment({
      elements,
      redirect: 'if_required',
      confirmParams: {
        payment_method_data: {
          billing_details: {
            address: {
              country: 'never',
            },
          },
        },
      },
    });

On the front end, I have specified the following, but the country information is not hidden and I need your support!

empty ether
#

you would specify Japan in your code above

            address: {
              country: 'JP',
            },
          },```
strange remnant
#

I'd like to skip this!
In that case, how do I pass const hoge to confirmPayment?

    const hoge = elements.create('payment', {
      fields: { billingDetails: { address: { country: 'never' } } },
    });

    const { error } = await stripe.confirmPayment({
      elements,
      redirect: 'if_required',
      // where?
    });
empty ether
strange remnant
#

I had overlooked it.
I checked and wrote it down, but how should I handle paymentElement after this?

   const paymentElement = elements.create('payment', {
      fields: {
        billingDetails: {
          address: {
            country: 'never',
          },
        },
      },
    });

    const { error } = await stripe.confirmPayment({
      elements,
      redirect: 'if_required',
      // where?
    });
empty ether