#kwac.
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. 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.
- kwac-plugin-error, 16 hours ago, 11 messages
- kwac.-account-support, 2 days ago, 4 messages
`
public function include_stripe_js() {
?>
<script src="https://js.stripe.com/v3/"></script>
<script>
var stripe = Stripe('');
var elements = stripe.elements();
var card = elements.create('card');
card.mount('#stripe-card-element');
</script>
<?php
}
`
Please delete your key from here
Do you have a screen recording or a URL to reproduce the issue?
Do you see any errors in the console?
Wait I will provide screenshots
Also, if you're building a new integration I recommend you to use the Payment Element, and not 'card': https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements
Sometimes I get this error message - 'controller-cc848a9ad…2497a003323d67.js:1 [Stripe.js] The selector you specified (#stripe-card-element) applies to 2 DOM elements that are currently on the page. The Stripe Element will be mounted to the first one.'
I think this is just a warning.
Is this the Stripe Elements?
This doesn't look like Stripe Card Element.
in js code?
On the screenshot
Alright, so I removed the code and replaced with this only element
<div id="stripe-card-element" class="wc-stripe-elements-field"> <!-- a Stripe Element will be inserted here. --> </div>
it still appears then disappears
just a moment i will try this doc instruction
Is this correct declaration? Do I need to echo client secret in options = { client_secret:
Are you following the doc I shared?
yes
You need to load the client secret from your backend when you create the PaymentIntent
load it from this? did i even put those keys correctly
That's not the Client ID.
You only need the Secret Key on the backend.
What programming language are you using?
PHP
You can see all examples in PHP: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements&lang=php
For what exactly?
In any case, pk_test_xxx is not a client ID.
Okay I might return later, I will try to get this fixed