DEV Community

Discussion on: How to collect payments with PayPal in your React application

Collapse
 
tadjerounimohamedadel profile image
Adel Mohamed Tadjerouni

Thanks for this awesome post.
I just have a note: why you saved your clientId on a js file, I think is better to use .env or .env.local and save it as an environment variable
Thanks again

Collapse
 
debosthefirst profile image
Adebola

Hey. Thanks for leaving a comment. The clientId will be exposed on the client side either ways so exposing it isn't too much of a security risk as PayPal handles ensuring that it's secure.