#resmurf

1 messages · Page 1 of 1 (latest)

frail voidBOT
#

Hello! We'll be with you shortly. 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.

  • resmurf, 53 minutes ago, 24 messages
meager oak
#

List Payment Method Domains API can be used along with Stripe-Account header as connected account ID:

vernal dust
#

There's no way to see it through the API?

#

It's just i just created an account and added the domain and wanted to make sure it was added.

#

acct_1OMMf8QsiYsR8NCM

Through the dashboard there's nothing i could find.

meager oak
#

There's no way to see it through the API?
The above doc is the API to retrieve the payment method domains of an account. Have you tried that?

vernal dust
#

Sorry, I meant besides the API.

meager oak
#

No worries! I'm afraid domain registration on the connected accounts can only be retrieved or checked via API, but not through Dashboard

vernal dust
#

I got it to work. Thanks

#

Btw, is it normal for the apple py to get stuck at loading while testing?

meager oak
#

Shouldn't be!

vernal dust
#

It takes a long time at processing; although ido get a response if it was success or failed already in the bacckground

meager oak
#

Which integration do you use? Payment Element, Payment Request Button or Express Checkout Element?

vernal dust
#

PaymentRequestButtonElement

#
         pr.on('paymentmethod', async (e) => {
            const { error, paymentIntent } = await stripe.confirmCardPayment(
                paymentIntentSecret,
                {
                    payment_method: e.paymentMethod.id,
                },{
                    handleActions: false
                }
            );

            if (error) {
                console.log(error)
                e.complete('fail');
                toast.error(error.message);
                return;
            }
            console.log(paymentIntent)

            e.complete('success');
            toast.success('Payment successful!');
        });```
meager oak
#

Did you get payment intent logged upon successful stripe.confirmCardPayment? e.complete('success'); should be the one closing the Apple Pay sheet after successful payment

vernal dust
#

Isn't e.complete the one that closses it?

#

It shjouldn't get logged although i can't see it on my phone

#

It's currently stoping at the error cuz i already paid that paymentintent

#

Could it be because the paymentIntent amount does not match the front-end sent to the applepay?

meager oak
#

Yup! e.complete is the function to close the Apple Pay interface. In your code above, you've added console.log(paymentIntent) which should be logged before proceeding to e.complete('success');

Why did it stop at the error if the payment was made successfully? Shouldn't skip the if (error) function?

#

Was there any error?

vernal dust
#

Yes, there is an error. Cause the intent as already paid.

It should still close it in here:

if (error) {
                console.log(error)
                e.complete('fail');
                toast.error(error.message);
                return;
            }
meager oak
#

If the payment was paid successfully, it shouldn't go to error loop unless you make the payment again

vernal dust
#

I'm trying to make the payment again and it goes into the endless loop

#

Also the first time i paidit, went into the loop

meager oak
#

Can you share your development website, so that I can take a look?

vernal dust
#

Hmm i will push an update let me check if something else might bebreakng it

#

Something else was breaking it

#

Just fixed it. Thank you River once again.

#

You've been really helpful.

meager oak
#

No problem! Happy to help 😄