#tomcon-checkout-payments
1 messages ยท Page 1 of 1 (latest)
Hmm... that's strange - are you only testing locally right now? If you have a live site that I can try out myself that'd be great
I've not tried the live keys for a while, will do so now
It doesn't have to be live keys, I meant more a non-localhost site that we can access
Can you confirm that I dont need to use the api publishkey or create a paymentintent explicity in this scenario please
It's just dawned on me that I upgraded the version of the api we're using and maybe need to refresh/regenerate the api keys?
YOu shouldn't need to regenerate your api keys when updating your api version
and no, you shouldn't need your publishable key or a payment intent in this scenario
Thanks
this is the object passed to the createcheckout
{
customer_email: "tomconlonuk@gmail.com",
payment_intent_data: {
metadata: {
contactid: 3647,
productid: 1006,
productname: "Club Vest",
category: "shop",
},
},
line_items: [
{
price_data: {
currency: "gbp",
product_data: {
name: "Club Vest",
},
unit_amount: "1500",
},
quantity: 1,
},
],
mode: "payment",
success_url: "https://8c29-82-38-91-203.ngrok.io/tripe/success",
cancel_url: "https://8c29-82-38-91-203.ngrok.io/tripe/cancel",
payment_method_types: [
"card",
],
}
don't suppose you see anything : )
what does the dashboard log
"status": "requires_payment_method",
mean?
no ideas @analog valley?
That just means you haven't collected any payment for that payment intent yet
If you log out the URL before win.location = url , what do you get?
its a SPA so do you mean just log out of it?
the stripe UI is in another tab of course
I'm going to try to test it on the dev server, its a private app (athletics club members)
No, like print out what the URL is to confirm that it's correct
this is on the dev server, not local both show same result - stripe checkout ui "loading loading"
fwiw I've almost lost the will to live and subs are almost 2 weeks overdue so this is genuinely urgent
Is it possible you have some logic on your end that's converting the url to lowercase? It's odd that the whole URL is in lower case, and I'm not seeing that as a valid Checkout Session ID at all
I'll double check but don't think so - and also console.log the session object that's returned from stripe
session object from stripe (local):
{
id: "cs_test_a15gprMVE8yi3hjpCuJ3KMeAp75zTwxWbiRbnVViyFBbPtyZ7nHQLc1Xgd",
object: "checkout.session",
after_expiration: null,
allow_promotion_codes: null,
amount_subtotal: 1500,
amount_total: 1500,
automatic_tax: {
enabled: false,
status: null,
},
billing_address_collection: null,
cancel_url: "https://8c29-82-38-91-203.ngrok.io/tripe/cancel",
client_reference_id: null,
consent: null,
consent_collection: null,
currency: "gbp",
customer: null,
customer_creation: "always",
customer_details: {
address: null,
email: "tomconlonuk@gmail.com",
name: null,
phone: null,
tax_exempt: "none",
tax_ids: null,
},
customer_email: "tomconlonuk@gmail.com",
expires_at: 1649875088,
livemode: false,
locale: null,
metadata: {
},
mode: "payment",
payment_intent: "pi_3KnobMKCX92KKgSW12pMkFMB",
payment_link: null,
payment_method_options: {
},
payment_method_types: [
"card",
],
payment_status: "unpaid",
phone_number_collection: {
enabled: false,
},
recovered_from: null,
setup_intent: null,
shipping: null,
shipping_address_collection: null,
shipping_options: [
],
shipping_rate: null,
status: "open",
submit_type: null,
subscription: null,
success_url: "https://8c29-82-38-91-203.ngrok.io/tripe/success",
total_details: {
amount_discount: 0,
amount_shipping: 0,
amount_tax: 0,
},
url: "https://checkout.stripe.com/pay/cs_test_a15gprMVE8yi3hjpCuJ3KMeAp75zTwxWbiRbnVViyFBbPtyZ7nHQLc1Xgd#fidkdWxOYHwnPyd1blpxYHZxWnxqN0tSQX1gbjBdQVc3SE9SS3RATkpHfCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBabHFgaCcpJ2BrZGdpYFVpZGZgbWppYWB3dic%2FcXdwYHgl",
}
And with the example you jsut sent over, what is the URL that is being set to win.location?
Does it exactly match what you're getting back in the response from Stripe, or it is all lowercase like the other url you sent over?
you're right! it is being lowercased
Aaaaarggggg!!!
but happy : )
just need to verify aok
phewww - hopefully that does the trick
๐ sorry it was such a pain - but hurrah! glad you could get it working
๐