#bbyford-payment-methods

1 messages · Page 1 of 1 (latest)

stoic dagger
#

Hey there 👋 as long as you're in test mode you can use test cards.

#

It seems like when you created the payment method that it wasn't attached to a customer, in which case it would only be allowed to be used once.

loud bronze
#

... so how do i test after one time use?

#

and how do we test customer subs in that case too?

#

are there other card numbers too use then?

stoic dagger
#

You have a couple options:

  1. You can create multiple payment methods (there is no limit on the quantity that you can create with the same card number)
  2. You can attach the payment method to a customer, this would be a good idea for testing subs
loud bronze
#

strange, i thought i was making a new payment request each time -> new method?

stoic dagger
#

Can you share the code snippet that you're using to try creating a new payment method

loud bronze
#

my js

#

stripe.handleCardPayment(clientSecret, cardElement, {
payment_method_data: {
billing_details: {
name: cardholderName,
email: customerEmail,
phone: customerPhone
}
},
receipt_email: customerEmail

            }).then
#

after that it sends the info to a php server which uses the resulting info to communicate to stripe

stoic dagger
#

Gotcha, so yeah that looks like the frontend code to collect the payment information provided via Elements. That all looks right though, and I don't suspect it's where you saw that error.

#

Do you happen to have an ID of an object in the flow (from when you saw the error) that I could pull up on my end? The payment intent ID (pi_XXX) or request ID (req_XXX) would be most useful.

loud bronze
#

sure

#

pi_2KFKHjoh4qmUrbgA0O9iSQpW

#

ive been integrating the subscription and customer registation stuff recently ontop of the payments so might be thats the issue

stoic dagger
#

Thanks, pulling that up now.

#

Hm, that one looks like it's worked so far, though it's pending capture currently.

loud bronze
#

mmmm getting that error back on my side

#

will check the stripe dashoabrd

stoic dagger
#

I'm also pulling up broader account logs on my side

#

Oh

loud bronze
#

mmmm maybe im capturing and then doing something else after the fact?

stoic dagger
#

It looks like the error is surfacing when you try attaching the payment method to the customer

loud bronze
#

.....ahhhhhhh ok

#

something stupid happening in my php then

#

thank you for your time!!!

stoic dagger
#

Any time!