Please Help me with this i will really appreciate it I am trying to solve it for past 5 days
Solve what? You didn't ask a question or state what's not working.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
This is mine PlanBlade.php
Stripe.setPublishableKey("{{ config('services.stripe.key') }}");
$(function() {
var $form = $('#payment-form');
$form.submit(function(event) {
// Disable the submit button to prevent repeated clicks:
$form.find('.submit').prop('disabled', true);
// Request a token from Stripe:
Stripe.card.createToken($form, stripeResponseHandler);
// Prevent the form from being submitted:
return false;
});
});
function stripeResponseHandler(status, response) {
// Grab the form:
var $form = $('#payment-form');
if (response.error) { // Problem!
// Show the errors on the form:
$form.find('.payment-errors').text(response.error.message);
$form.find('.submit').prop('disabled', false); // Re-enable submission
} else { // Token was created!
// Get the token ID:
var token = response.id;
// Insert the token ID into the form so it gets submitted to the server:
$form.append($('<input type="hidden" name="stripeToken">').val(token));
// Submit the form:
$form.get(0).submit();
}
};
</script>
according to the docs https://stripe.com/docs/api/errors
402 - Request Failed The parameters were valid but the request failed.
can you post all the response?
Solve what? You didn't ask a question or state what's not working.
@Cronix, you must figure it out :P
Please or to participate in this conversation.