Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP

Timothy Boland
Timothy Boland
18,237 Points

Is it safe to share the Shirts4Mike PayPal code on Github

I would like to share my Shirts4Mike code on Github, so my mentor(s) can get a look at what I have been building...but Im worried that the Paypal code may expose my Paypal accounts publicly...Should I be worried?

1 Answer

Paypal code like your API keys that link to your account? Yes, that would be bad form. It's considered best practice to not put any of your keys in version control. Look into using environment variables.

Alternatively, you could use a github gists https://gist.github.com/ and use the secret gist option if you're just looking to show some parts of your code to your mentor.

-twiz

Timothy Boland
Timothy Boland
18,237 Points

Im speaking of the hosted_button_id's for each shirt...are there any videos here on treehouse that cover setting environment variables?

Timothy Boland
Timothy Boland
18,237 Points

Well, it turns out you can see the hosted_button_id's for each shirt anyway, if you view the source...although i dont think you can hack into a Paypal Account with that id.