本文整理汇总了PHP中Braintree_Configuration::getEnvironment方法的典型用法代码示例。如果您正苦于以下问题:PHP Braintree_Configuration::getEnvironment方法的具体用法?PHP Braintree_Configuration::getEnvironment怎么用?PHP Braintree_Configuration::getEnvironment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Braintree_Configuration
的用法示例。
在下文中一共展示了Braintree_Configuration::getEnvironment方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testConstructWithArrayOfCredentials
function testConstructWithArrayOfCredentials()
{
$config = new Braintree_Configuration(array('environment' => 'sandbox', 'merchantId' => 'sandbox_merchant_id', 'publicKey' => 'sandbox_public_key', 'privateKey' => 'sandbox_private_key'));
$this->assertEquals('sandbox', $config->getEnvironment());
$this->assertEquals('sandbox_merchant_id', $config->getMerchantId());
}
示例2: testDetectEnvironmentFromClientId
function testDetectEnvironmentFromClientId()
{
$config = new Braintree_Configuration(array('clientId' => 'client_id$development$integration_client_id', 'clientSecret' => 'client_secret$development$integration_client_secret'));
$this->assertEquals('development', $config->getEnvironment());
}