Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

andylcc349's avatar

Credit Card details not touching the server

On the laracasts payment screen, the credit card details are requested as part of the 'signup-form'. under the credit card input boxes is a message that says the card details never touch the server.

I know Jeffrey likes stripe, and i have seen some of the Laracasts video tutorials on payment processing etc - but I was just wondering how laracasts is submitting the credit card details as part of the sign up form (which posts to laracasts server), but the credit card details do not hit the server .

Did i miss one f the videos?

0 likes
2 replies
andylcc349's avatar

im possibly assuming that Laracasts has a javascript that selects which input fields are submitted to laracasts in the form post and the other fields are submittted to the payment processor via an ajax call.

rydurham's avatar

Stripe provides a javascript library that takes care of this. When you set up your payment details form, any input without a "name" attribute won't be submitted to your server.

https://stripe.com/docs/stripe.js/switching

When the payment form is submitted, stripe.js will send the cc details to the stripe server and return a card token which you then pass to your php application with the rest of the form data. The stripe php library then uses that card token to make charges or create "customers" or whatever it is you are looking to do.

1 like

Please or to participate in this conversation.