#alexz.9128
1 messages ยท Page 1 of 1 (latest)
๐ happy to help
Amazing :X
this is the url i provide: https://api.ocartedespre.ro/files/cover-images/alexu-99c55f.png
would you mind sharing the product ID?
I uploaded the same image in a image upload service online. https://i.ibb.co/PxLrmY2/alex-99c55f.png and when i test this one it's working ๐ฆ
const session = await stripe.checkout.sessions.create({
mode: "payment",
payment_method_types: ["card"],
locale: "ro",
success_url: "https://ocartedespre.ro/account?tab=neworder&state=success",
cancel_url: "https://ocartedespre.ro/account?tab=neworder&state=cancel",
customer_email: userEmail,
shipping_address_collection: {
allowed_countries: ["RO"],
},
billing_address_collection: "required",
metadata: {
userId: ${userId},
bookId: ${bookId},
},
line_items: [
{
price_data: {
currency: CONFIG.currency,
unit_amount: CONFIG.price,
product_data: {
name: ${productName},
images: [productImage],
},
},
quantity: CONFIG.quantity,
},
],
});
I;m doing a session from scratch i don't have a product id
"line_items": [
{
"id": "li_1OYndXIXM48CCWLOJGHGMtdo",
"object": "item",
"adjustable_quantity": null,
"cross_sell_from": null,
"description": null,
"discount_amounts": [],
"images": [
"https://stripe-camo.global.ssl.fastly.net/e7d4894d78a2aac34a680f198c95c9e68fd2af9a7ccb13346231a79b4c06fc18/68747470733a2f2f6170692e6f63617274656465737072652e726f2f66696c65732f636f7665722d696d616765732f616c6578752d3939633535662e706e67",
"https://stripe-camo.global.ssl.fastly.net/58882e58a67e975eb2b7694cd71d581c25261aa01b66a25bc9bd07623fad5d46/68747470733a2f2f692e6962622e636f2f50784c726d59322f616c65782d3939633535662e706e67"
],
"name": "o carte despre alex",
"price": {
"id": "price_1OYndWIXM48CCWLOZjnySTnu",
"object": "price",
"active": false,
"billing_scheme": "per_unit",
"currency": "ron",
"custom_unit_amount": null,
"livemode": false,
"product": {
"id": "prod_PNYlo0aclKFIVy",
"object": "product",
"active": false,
"addons": null,
"attributes": [],
"description": null,
"images": [
"https://api.ocartedespre.ro/files/cover-images/alexu-99c55f.png",
"https://i.ibb.co/PxLrmY2/alex-99c55f.png"
],
"livemode": false,
"name": "o carte despre alex",
"unit_label": null,
"url": null
},
"recurring": null,
"tax_behavior": "unspecified",
"tiers_mode": null,
"transform_quantity": null,
"type": "one_time",
"unit_amount": 19900,
"unit_amount_decimal": "19900"
},
I found this in the stripe checkout session console
Maybe this is the id you need: li_1OYndXIXM48CCWLOJGHGMtdo
the reason why an image might not load, is if there was some restrictions for "bots" to access URLs on your server or if at the time of creating the Checkout Session the file wasn't accessible due to a network issue
There is no access control restriction ๐ฆ
I'm not sure why to be honest
but can you access this url? https://api.ocartedespre.ro/files/cover-images/alexu-99c55f.png
And your bot can't?
I was able to get the real reason behind the issue, thanks to a colleague
there was a TLS error, due to a certificate signing issue. The certificate you're using on this domain is signed by an unknown authority
@deft glen checking your server's certificate https://www.ssllabs.com/ssltest/analyze.html?d=api.ocartedespre.ro&hideResults=on
You can see that the report indicates that your certificate chain appears to be incomplete. To resolve this, I recommend visiting the issuer you bought the certificate from and re-installing your SSL certificate, including any 'bundle' file that comes with it. If you're having trouble with this, or have questions, I'd suggest sharing your SSL Labs results with your issuer, they can guide you in locating any intermediary certificates and resolving this.