braintree / braintree_dotnet

Braintree .NET library
https://developer.paypal.com/braintree/docs/start/overview
MIT License
136 stars 73 forks source link

Environment.ParseEnviroment(string environment) ToLowerInvariant #73

Closed Psypher9 closed 6 years ago

Psypher9 commented 6 years ago

General information

Issue description

I've been using ParseEnvironment to set up the my BraintreeGateway from values in my appsettings.json file. I have noticed that I would get Exceptions when I used SANDBOX or Sandbox or anything like it. So I was just looking through the repo and found the code for the ParseEnvironment method and noticed that the switch statement is looking for all lowercase environment strings but the switch is not forcing environment.ToLowerInvariant().

Would you accept a PR from me to update that? I'm willing to make that fix.

Thank you!

jackellenberger commented 6 years ago

Hi @Psypher9, yeah that seems like a great change! Just throw an extra test case in EnvironmentTest.cs and we'll merge it whenever you have it ready.

Cheers!