I’m trying to implement the latest version of stripe payment in a CakePHP project. I’m beginning in CakePHP.
My question is how to fetch client_secret in a Javacript function to make it look like stripe doc authorize.
My PaymentIntent is made inside my controller and it should return a secret Key. And that secret key should be use inside a JS function according to stripe Doc. How am I suppose to send or fetch that secret Key inside my JS function.