1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-22 05:20:56 +01:00
phorge-phorge/externals/balanced-php/src/Balanced/Settings.php
epriestley 23786784ef Add Balanced Payments API
Summary: Adds the Balanced PHP API to externals/. Ref T2787.

Test Plan: Used in next diff.

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran, aurelijus

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D5764
2013-04-25 09:47:30 -07:00

43 lines
1 KiB
PHP

<?php
namespace Balanced;
/**
* Configurable settings.
*
* You can either set these settings individually:
*
* <code>
* \Balanced\Settngs::api_key = 'my-api-key-secret';
* </code>
*
* or all at once:
*
* <code>
* \Balanced\Settngs::configure(
* 'https://api.balancedpayments.com',
* 'my-api-key-secret'
* );
* </code>
*/
class Settings
{
const VERSION = '0.7.1';
public static $url_root = 'https://api.balancedpayments.com',
$api_key = null,
$agent = 'balanced-php',
$version = Settings::VERSION;
/**
* Configure all settings.
*
* @param string url_root The root (schema://hostname[:port]) to use when constructing api URLs.
* @param string api_key The api key secret to use for authenticating when talking to the api. If null then api usage is limited to uauthenticated endpoints.
*/
public static function configure($url_root, $api_key)
{
self::$url_root= $url_root;
self::$api_key = $api_key;
}
}