This keeps all configuration information for your WebService::Braintree installation.
A singleton of this class is instantiated when you use WebService::Braintree. You are intended to set attributes of this class immediately, then the rest of the distribution knows what to do.
Get these values from Braintree's API credentials documentation.
These attributes are standard mutators. If you invoke them with a value, they will set the attribute to that value. If you invoke them without a value, they will return the current value.
This is your merchant_id.
This is your public_key.
This is your private_key.
This is your environment. The environment can be:
- development | integration
This is when you're using a local server for testing. It's unlikely you will ever want to use this.
This is when you're using your Braintree sandbox for testing.
This is when you're using qa-master.braintreegateway.com for testing.
This is when you're live and rocking.
If you provide a value other than the ones listed above, a warning will be thrown. This distribution will probably not work properly in that case.
Management reserves the right to change this from a warning to a thrown exception in the future.
Do yourself a favor and store these values in a configuration file, not your source-controlled code.
There is one read-only method.
This returns the Braintree API version this distribution speaks.