#sguttman_react-native-android-ttp

1 messages ¡ Page 1 of 1 (latest)

sharp pawnBOT
#

👋 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/1359904694503346378

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

bronze copper
#

Hello there

faint delta
#

hello

bronze copper
#

Do you see any underlying error in your logs?

faint delta
#

that's the problem, not show any error in the logs

bronze copper
#

Can you share the relevant PaymentIntent ID?

faint delta
#

pi_3R9NRNJUlBRDCBmg0ejVFfo8

#

or pi_3R9QjlJUlBRDCBmg1eJb68IG, with this payment works only with credit card

bronze copper
#

Hmm it looks like you are canceling the PaymentIntent immediately? It could be possible that it is prompting for PIN but you are canceling it? I'm also looking at our logs to see if I can see anything.

#

Can you remove that cancel request and test again?

#

Also are you using the same device for both of those PaymentIntents?

faint delta
#

No, I canceled it.
but no is the problem, the problem is when tap using a debit card, like pi_3R926lJUlBRDCBmg0yeRP8oe show "Error, try again" on the display.

bronze copper
#

I'm not seeing any errors from that device for that PaymentIntent.

#

Can you show me your client-side code?

#

The relevant parts, please.

faint delta
#

Sure

#

const { paymentIntent, error } = await retrievePaymentIntent(
data.paymentIntent as string
);

const {
error: errorCollect,
paymentIntent: collectedPaymentIntent,
} = await collectPaymentMethod({
paymentIntent,
});

#

and the server-side

try {
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY as string, {
typescript: true,
});

  const paymentIntent = await stripe.paymentIntents.create({
    amount: data.amount,
    currency: data.currency,
    payment_method_types: ["card_present"],
    capture_method: "manual",
    metadata: {
      plate: data.plate,
      serviceId: data.serviceId,
      deviceId: data.deviceId,
      endDate: data.endDate,
    },
  });
  return {
    customer: process.env.STRIPE_CLIENT_ID as string,
    paymentIntent: paymentIntent.client_secret,
  };
} catch (error) {
  console.log(error);
  return {
    error: "Stripe",
    message: "Error creating payment intent",
    statusCode: 400,
  };
}
bronze copper
#

Can you add logs to each step on the client and show me the output of those logs?

Also have you tried a different debit card? What card brand are you using here?

faint delta
#

Again, never show log to explain the general error.
I try diferrent debit card, Mastercard or Visa, physical or virtual card too

#

but if I use credit card work without any problem

bronze copper
#

Sure I understand that but you still need to do these other debugging steps. I can't tell you why your debit card isn't working when all you tell me is it just says "Error, try again".

#

Seeing the logs would indicate how far through the process you are getting. I'd also love to see more of your code. Recording a short video of you testing would also be helpful to be able to see exactly what happens and if there are any clues there.

faint delta
#

ok, I need time to get de video

sharp pawnBOT