Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

2.10.1

  • Loading branch information...
commit 056aae8f827165a0c99416dbc9227ce57bb0f224 1 parent 81bcfef
@braintreeps braintreeps authored
View
4 CHANGELOG.md
@@ -1,3 +1,7 @@
+## 2.10.1
+
+* Wrap dependency requirement in a function, to prevent pollution of the global namespace
+
## 2.10.0
* Added subscriptionDetails to Transaction
View
2  README.md
@@ -49,7 +49,7 @@ The following PHP extensions are required:
## Documentation
- * [Official documentation](http://www.braintreepaymentsolutions.com/docs/php)
+ * [Official documentation](http://www.braintreepayments.com/docs/php)
## License
View
13 lib/Braintree.php
@@ -139,11 +139,14 @@ public static function returnObjectOrThrowException($className, $resultObj)
throw new Braintree_Exception('PHP version >= 5.2.1 required');
}
-$requiredExtensions = array('xmlwriter', 'SimpleXML', 'openssl', 'dom', 'hash', 'curl');
-foreach ($requiredExtensions AS $ext) {
- if (!extension_loaded($ext)) {
- throw new Braintree_Exception('The Braintree library requires the ' . $ext . ' extension.');
+
+function requireDependencies() {
+ $requiredExtensions = array('xmlwriter', 'SimpleXML', 'openssl', 'dom', 'hash', 'curl');
+ foreach ($requiredExtensions AS $ext) {
+ if (!extension_loaded($ext)) {
+ throw new Braintree_Exception('The Braintree library requires the ' . $ext . ' extension.');
+ }
}
}
-
+requireDependencies();
View
4 lib/Braintree/CreditCard.php
@@ -12,8 +12,8 @@
*
* <b>== More information ==</b>
*
- * For more detailed information on CreditCards, see {@link http://www.braintreepaymentsolutions.com/gateway/credit-card-api http://www.braintreepaymentsolutions.com/gateway/credit-card-api}<br />
- * For more detailed information on CreditCard verifications, see {@link http://www.braintreepaymentsolutions.com/gateway/credit-card-verification-api http://www.braintreepaymentsolutions.com/gateway/credit-card-verification-api}
+ * For more detailed information on CreditCards, see {@link http://www.braintreepayments.com/gateway/credit-card-api http://www.braintreepaymentsolutions.com/gateway/credit-card-api}<br />
+ * For more detailed information on CreditCard verifications, see {@link http://www.braintreepayments.com/gateway/credit-card-verification-api http://www.braintreepaymentsolutions.com/gateway/credit-card-verification-api}
*
* @package Braintree
* @category Resources
View
4 lib/Braintree/Customer.php
@@ -12,7 +12,7 @@
*
* <b>== More information ==</b>
*
- * For more detailed information on Customers, see {@link http://www.braintreepaymentsolutions.com/gateway/customer-api http://www.braintreepaymentsolutions.com/gateway/customer-api}
+ * For more detailed information on Customers, see {@link http://www.braintreepayments.com/gateway/customer-api http://www.braintreepaymentsolutions.com/gateway/customer-api}
*
* @package Braintree
* @category Resources
@@ -288,7 +288,7 @@ public static function saleNoValidate($customerId, $transactionAttribs)
*
* If <b>query</b> is a string, the search will be a basic search.
* If <b>query</b> is a hash, the search will be an advanced search.
- * For more detailed information and examples, see {@link http://www.braintreepaymentsolutions.com/gateway/customer-api#searching http://www.braintreepaymentsolutions.com/gateway/customer-api}
+ * For more detailed information and examples, see {@link http://www.braintreepayments.com/gateway/customer-api#searching http://www.braintreepaymentsolutions.com/gateway/customer-api}
*
* @param mixed $query search query
* @param array $options options such as page number
View
2  lib/Braintree/Error/Validation.php
@@ -13,7 +13,7 @@
*
* <b>== More information ==</b>
*
- * For more detailed information on Validation errors, see {@link http://www.braintreepaymentsolutions.com/gateway/validation-errors http://www.braintreepaymentsolutions.com/gateway/validation-errors}
+ * For more detailed information on Validation errors, see {@link http://www.braintreepayments.com/gateway/validation-errors http://www.braintreepaymentsolutions.com/gateway/validation-errors}
*
* @package Braintree
* @subpackage Error
View
2  lib/Braintree/Error/ValidationErrorCollection.php
@@ -12,7 +12,7 @@
*
* <b>== More information ==</b>
*
- * For more detailed information on Validation errors, see {@link http://www.braintreepaymentsolutions.com/gateway/validation-errors http://www.braintreepaymentsolutions.com/gateway/validation-errors}
+ * For more detailed information on Validation errors, see {@link http://www.braintreepayments.com/gateway/validation-errors http://www.braintreepaymentsolutions.com/gateway/validation-errors}
*
* @package Braintree
* @subpackage Error
View
1  lib/Braintree/Http.php
@@ -65,6 +65,7 @@ private static function _doRequest($httpVerb, $path, $requestBody = null)
curl_setopt($curl, CURLOPT_TIMEOUT, 60);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $httpVerb);
curl_setopt($curl, CURLOPT_URL, Braintree_Configuration::merchantUrl() . $path);
+ curl_setopt($curl, CURLOPT_ENCODING, 'gzip');
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
'Accept: application/xml',
'Content-Type: application/xml',
View
2  lib/Braintree/Subscription.php
@@ -4,7 +4,7 @@
*
* <b>== More information ==</b>
*
- * For more detailed information on Subscriptions, see {@link http://www.braintreepaymentsolutions.com/gateway/subscription-api http://www.braintreepaymentsolutions.com/gateway/subscription-api}
+ * For more detailed information on Subscriptions, see {@link http://www.braintreepayments.com/gateway/subscription-api http://www.braintreepaymentsolutions.com/gateway/subscription-api}
*
* PHP Version 5
*
View
6 lib/Braintree/Transaction.php
@@ -45,7 +45,7 @@
* 'email' => 'dan@example.com',
* 'phone' => '419-555-1234',
* 'fax' => '419-555-1235',
- * 'website' => 'http://braintreepaymentsolutions.com'
+ * 'website' => 'http://braintreepayments.com'
* ),
* 'billing' => array(
* 'firstName' => 'Carl',
@@ -139,7 +139,7 @@
*
* <b>== More information ==</b>
*
- * For more detailed information on Transactions, see {@link http://www.braintreepaymentsolutions.com/gateway/transaction-api http://www.braintreepaymentsolutions.com/gateway/transaction-api}
+ * For more detailed information on Transactions, see {@link http://www.braintreepayments.com/gateway/transaction-api http://www.braintreepaymentsolutions.com/gateway/transaction-api}
*
* @package Braintree
* @category Resources
@@ -369,7 +369,7 @@ public static function saleNoValidate($attribs)
*
* If <b>query</b> is a string, the search will be a basic search.
* If <b>query</b> is a hash, the search will be an advanced search.
- * For more detailed information and examples, see {@link http://www.braintreepaymentsolutions.com/gateway/transaction-api#searching http://www.braintreepaymentsolutions.com/gateway/transaction-api}
+ * For more detailed information and examples, see {@link http://www.braintreepayments.com/gateway/transaction-api#searching http://www.braintreepaymentsolutions.com/gateway/transaction-api}
*
* @param mixed $query search query
* @param array $options options such as page number
View
2  lib/Braintree/Version.php
@@ -18,7 +18,7 @@
*/
const MAJOR = 2;
const MINOR = 10;
- const TINY = 0;
+ const TINY = 1;
/**
* @ignore
View
4 tests/integration/TransactionTest.php
@@ -87,7 +87,7 @@ function testSale_withAllAttributes()
'email' => 'dan@example.com',
'phone' => '419-555-1234',
'fax' => '419-555-1235',
- 'website' => 'http://braintreepaymentsolutions.com'
+ 'website' => 'http://braintreepayments.com'
),
'billing' => array(
'firstName' => 'Carl',
@@ -148,7 +148,7 @@ function testSale_withAllAttributes()
$this->assertEquals('dan@example.com', $transaction->customerDetails->email);
$this->assertEquals('419-555-1234', $transaction->customerDetails->phone);
$this->assertEquals('419-555-1235', $transaction->customerDetails->fax);
- $this->assertEquals('http://braintreepaymentsolutions.com', $transaction->customerDetails->website);
+ $this->assertEquals('http://braintreepayments.com', $transaction->customerDetails->website);
$this->assertEquals('Carl', $transaction->billingDetails->firstName);
$this->assertEquals('Jones', $transaction->billingDetails->lastName);
Please sign in to comment.
Something went wrong with that request. Please try again.