#CapitanRex-paymentintents

1 messages · Page 1 of 1 (latest)

zealous verge
#

Hello! Can you provide a bit more detail about why this is unexpected? What status are you expecting instead?

mellow vector
#

var createOptions = new PaymentIntentCreateOptions
{
PaymentMethodTypes = new List<string>
{
"card",
},
Amount = total,
Currency = "usd",
ApplicationFeeAmount = fee,
Metadata = new Dictionary<string, string>
{
{"productId", card.ProductId},
{"customerId", !string.IsNullOrEmpty(card.CustomerId) ? card.CustomerId : " " },
{"quantity", card.Quantity.ToString() },
{"merchantId", product.MerchantId.ToString() },
{"address", " " },
},
Description = "CARD Charge [" + product.Name + "]",
};

            var requestOptions = new RequestOptions();
            requestOptions.StripeAccount = card.AccountId;
            var create = service.Create(createOptions, requestOptions);
#

i have this in the backend

#

and this in the frontend

zealous verge
#

Whats the ID of the payment intent you're seeing with that status?

mellow vector
#

pi_3Jn4lzQuv5bmbdnj0yaPgb5m

zealous verge
#

That payment intent was never confirmed and provided with payment information - so it's expected that it's still in that state

mellow vector
#

how can i confirm the payment intent

#

i need confirm that in the backend or in the frontend?

zealous verge
#

You confirm in the front end - you already have that code there for confirmCardPayment

mellow vector
#

but when im call the confirm it throws that error

zealous verge
#

What is the full error message you're getting?

mellow vector
zealous verge
#

Ah, that's an entirely different error and is unrelated to it having a status of requires_payment_method

#

I'm guessing you're using connect right?

mellow vector
#

right

zealous verge
mellow vector
#

yeah we have the same account id

zealous verge
#

what does your code for setting it from the front-end look like?

mellow vector
zealous verge
#

Have you tried loadStripe(stripeKey, { stripeAccount: stripeAccount })

mellow vector
#

yeah

#

in the last image

#

line 30

zealous verge
#

You have { stripeAccount } not { stripeAccount: stripeAccount }

#

I'd also suggest logging that stripeAccount just to verify it's the value you're expecting

mellow vector
#

thanks

#

looks like it works now