#textures-3d-models_code

1 messages · Page 1 of 1 (latest)

wheat slateBOT
#

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

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

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

candid gyro
#

<?php

require "./shared.php";

$paymentIntent = $stripe->paymentIntents->create([
'amount' => 7099,
'currency' => 'usd',
'automatic_payment_methods' => ['enabled' => true],
])

?>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Accept a payment</title>
<link rel="stylesheet" href="/css/base.css" />
</head>
<body>
<main>
<h1>Accept a payment</h1>
</main>

<form id="payment-form">
    <div id="payment-element"></div>
    <button>Pay</button>
    <div id="error-messages"></div>
</form>

<script src="https://js.stripe.com/v3/"></script>
<script>
    const stripe = Stripe('<?= $_ENV["STRIPE_PUBLISHABLE_KEY"] ?>')
    const elements = stripe.elements(
        clientSecret: '<?= $paymentIntent->client_secret ?>'
    )
    const paymentElement = elements.create('payment')
    paymentElement.mount('#payment-element')
</script>

</body>
</html>

Full code

hasty flume
#

Hi, are you seeing any errors on your developer's consols? What have you done to start troubleshooting this?

candid gyro
#

Uncaught SyntaxError: missing ) after argument list
Content-Security-Policy: The page settings prevented the execution of an inline script (script-src-elem) because it violates the following directive: "script-src 'self'" preload.js:139:16
Content-Security-Policy: (Report-Only Policy) The page settings might prevent the execution of an inline script (script-src-elem) because it violates the following directive: "script-src 'self'" preload.js:139:16
Content-Security-Policy: The page settings prevented the execution of an inline script (script-src-elem) because it violates the following directive: "script-src https://m.stripe.network 'sha256-5DA+a07wxWmEka9IdoWjSPVHb17Cp5284/lJzfbl8KA=' 'sha256-/5Guo2nzv5n/w6ukZpOBZOtTJBJPSkJ6mhHpnBgm3Ls='" preload.js:139:16
A partitioned access to a cookie or storage was provided to
"https://m.stripe.network/inner.html#url=http%3A%2F%2Flocalhost%3A4242%2F&title=Accept a payment&referrer=&muid=08a84c7a-9185-4b09-a680-3eb176b619bf4b9fdb&sid=d9124dd4-9190-4d69-befa-2cc2503891b82fb7ce&version=6&preview=false&__shared_params__[version]=v3"
because it is loaded in a third-party context and dynamic state partitioning is enabled.
out-4.5.44.js:1:39660
Cookie warnings: 3
A resource is blocked by OpaqueResponseBlocking, please check the browser console for details. 3 csp-report
TypeError: styleElement.sheet is null
element-collapser.js:91:9
Content-Security-Policy: The page settings prevented the application of an inline style (style-src-elem) because it violates the following directive: "style-src 'self'" element-collapser.js:88:57
A resource is blocked by OpaqueResponseBlocking, please check the browser console for details. 2 csp-report
Yes, I have several errors. I quickly translated them with ChatGPT because they were in French. I tried a few things for Content-Security-Policy, but it didn’t change much. I don’t really know what to do, to be honest.

hasty flume
#

The above seem to be more warnings and not blockers it does not appear

#

At what stage is your integration broken?

#

Can you start adding logs to your code?