#bbyford-payment-methods
1 messages · Page 1 of 1 (latest)
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.
... 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?
You have a couple options:
- You can create multiple payment methods (there is no limit on the quantity that you can create with the same card number)
- You can attach the payment method to a customer, this would be a good idea for testing subs
strange, i thought i was making a new payment request each time -> new method?
Can you share the code snippet that you're using to try creating a new payment method
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
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.
sure
pi_2KFKHjoh4qmUrbgA0O9iSQpW
ive been integrating the subscription and customer registation stuff recently ontop of the payments so might be thats the issue
Thanks, pulling that up now.
Hm, that one looks like it's worked so far, though it's pending capture currently.
mmmm maybe im capturing and then doing something else after the fact?
It looks like the error is surfacing when you try attaching the payment method to the customer
.....ahhhhhhh ok
something stupid happening in my php then
thank you for your time!!!
Any time!