Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

2.10.1

  • Loading branch information...
commit 056aae8f827165a0c99416dbc9227ce57bb0f224 1 parent 81bcfef
Braintree Open Source authored June 16, 2011
4  CHANGELOG.md
Source Rendered
... ...
@@ -1,3 +1,7 @@
  1
+## 2.10.1
  2
+
  3
+* Wrap dependency requirement in a function, to prevent pollution of the global namespace
  4
+
1 5
 ## 2.10.0
2 6
 
3 7
 * Added subscriptionDetails to Transaction
2  README.md
Source Rendered
@@ -49,7 +49,7 @@ The following PHP extensions are required:
49 49
 
50 50
 ## Documentation
51 51
 
52  
- * [Official documentation](http://www.braintreepaymentsolutions.com/docs/php)
  52
+ * [Official documentation](http://www.braintreepayments.com/docs/php)
53 53
 
54 54
 ## License
55 55
 
13  lib/Braintree.php
@@ -139,11 +139,14 @@ public static function returnObjectOrThrowException($className, $resultObj)
139 139
     throw new Braintree_Exception('PHP version >= 5.2.1 required');
140 140
 }
141 141
 
142  
-$requiredExtensions = array('xmlwriter', 'SimpleXML', 'openssl', 'dom', 'hash', 'curl');
143  
-foreach ($requiredExtensions AS $ext) {
144  
-    if (!extension_loaded($ext)) {
145  
-        throw new Braintree_Exception('The Braintree library requires the ' . $ext . ' extension.');
  142
+
  143
+function requireDependencies() {
  144
+    $requiredExtensions = array('xmlwriter', 'SimpleXML', 'openssl', 'dom', 'hash', 'curl');
  145
+    foreach ($requiredExtensions AS $ext) {
  146
+        if (!extension_loaded($ext)) {
  147
+            throw new Braintree_Exception('The Braintree library requires the ' . $ext . ' extension.');
  148
+        }
146 149
     }
147 150
 }
148 151
 
149  
-
  152
+requireDependencies();
4  lib/Braintree/CreditCard.php
@@ -12,8 +12,8 @@
12 12
  *
13 13
  * <b>== More information ==</b>
14 14
  *
15  
- * 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 />
16  
- * 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}
  15
+ * 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 />
  16
+ * 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}
17 17
  *
18 18
  * @package    Braintree
19 19
  * @category   Resources
4  lib/Braintree/Customer.php
@@ -12,7 +12,7 @@
12 12
  *
13 13
  * <b>== More information ==</b>
14 14
  *
15  
- * For more detailed information on Customers, see {@link http://www.braintreepaymentsolutions.com/gateway/customer-api http://www.braintreepaymentsolutions.com/gateway/customer-api}
  15
+ * For more detailed information on Customers, see {@link http://www.braintreepayments.com/gateway/customer-api http://www.braintreepaymentsolutions.com/gateway/customer-api}
16 16
  *
17 17
  * @package    Braintree
18 18
  * @category   Resources
@@ -288,7 +288,7 @@ public static function saleNoValidate($customerId, $transactionAttribs)
288 288
      *
289 289
      * If <b>query</b> is a string, the search will be a basic search.
290 290
      * If <b>query</b> is a hash, the search will be an advanced search.
291  
-     * For more detailed information and examples, see {@link http://www.braintreepaymentsolutions.com/gateway/customer-api#searching http://www.braintreepaymentsolutions.com/gateway/customer-api}
  291
+     * For more detailed information and examples, see {@link http://www.braintreepayments.com/gateway/customer-api#searching http://www.braintreepaymentsolutions.com/gateway/customer-api}
292 292
      *
293 293
      * @param mixed $query search query
294 294
      * @param array $options options such as page number
2  lib/Braintree/Error/Validation.php
@@ -13,7 +13,7 @@
13 13
  *
14 14
  * <b>== More information ==</b>
15 15
  *
16  
- * For more detailed information on Validation errors, see {@link http://www.braintreepaymentsolutions.com/gateway/validation-errors http://www.braintreepaymentsolutions.com/gateway/validation-errors}
  16
+ * For more detailed information on Validation errors, see {@link http://www.braintreepayments.com/gateway/validation-errors http://www.braintreepaymentsolutions.com/gateway/validation-errors}
17 17
  *
18 18
  * @package    Braintree
19 19
  * @subpackage Error
2  lib/Braintree/Error/ValidationErrorCollection.php
@@ -12,7 +12,7 @@
12 12
  *
13 13
  * <b>== More information ==</b>
14 14
  *
15  
- * For more detailed information on Validation errors, see {@link http://www.braintreepaymentsolutions.com/gateway/validation-errors http://www.braintreepaymentsolutions.com/gateway/validation-errors}
  15
+ * For more detailed information on Validation errors, see {@link http://www.braintreepayments.com/gateway/validation-errors http://www.braintreepaymentsolutions.com/gateway/validation-errors}
16 16
  *
17 17
  * @package    Braintree
18 18
  * @subpackage Error
1  lib/Braintree/Http.php
@@ -65,6 +65,7 @@ private static function _doRequest($httpVerb, $path, $requestBody = null)
65 65
         curl_setopt($curl, CURLOPT_TIMEOUT, 60);
66 66
         curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $httpVerb);
67 67
         curl_setopt($curl, CURLOPT_URL, Braintree_Configuration::merchantUrl() . $path);
  68
+        curl_setopt($curl, CURLOPT_ENCODING, 'gzip');
68 69
         curl_setopt($curl, CURLOPT_HTTPHEADER, array(
69 70
             'Accept: application/xml',
70 71
             'Content-Type: application/xml',
2  lib/Braintree/Subscription.php
@@ -4,7 +4,7 @@
4 4
  *
5 5
  * <b>== More information ==</b>
6 6
  *
7  
- * For more detailed information on Subscriptions, see {@link http://www.braintreepaymentsolutions.com/gateway/subscription-api http://www.braintreepaymentsolutions.com/gateway/subscription-api}
  7
+ * For more detailed information on Subscriptions, see {@link http://www.braintreepayments.com/gateway/subscription-api http://www.braintreepaymentsolutions.com/gateway/subscription-api}
8 8
  *
9 9
  * PHP Version 5
10 10
  *
6  lib/Braintree/Transaction.php
@@ -45,7 +45,7 @@
45 45
  *     'email' => 'dan@example.com',
46 46
  *     'phone' => '419-555-1234',
47 47
  *     'fax' => '419-555-1235',
48  
- *     'website' => 'http://braintreepaymentsolutions.com'
  48
+ *     'website' => 'http://braintreepayments.com'
49 49
  *    ),
50 50
  *    'billing'    => array(
51 51
  *      'firstName' => 'Carl',
@@ -139,7 +139,7 @@
139 139
  *
140 140
  * <b>== More information ==</b>
141 141
  *
142  
- * For more detailed information on Transactions, see {@link http://www.braintreepaymentsolutions.com/gateway/transaction-api http://www.braintreepaymentsolutions.com/gateway/transaction-api}
  142
+ * For more detailed information on Transactions, see {@link http://www.braintreepayments.com/gateway/transaction-api http://www.braintreepaymentsolutions.com/gateway/transaction-api}
143 143
  *
144 144
  * @package    Braintree
145 145
  * @category   Resources
@@ -369,7 +369,7 @@ public static function saleNoValidate($attribs)
369 369
      *
370 370
      * If <b>query</b> is a string, the search will be a basic search.
371 371
      * If <b>query</b> is a hash, the search will be an advanced search.
372  
-     * For more detailed information and examples, see {@link http://www.braintreepaymentsolutions.com/gateway/transaction-api#searching http://www.braintreepaymentsolutions.com/gateway/transaction-api}
  372
+     * For more detailed information and examples, see {@link http://www.braintreepayments.com/gateway/transaction-api#searching http://www.braintreepaymentsolutions.com/gateway/transaction-api}
373 373
      *
374 374
      * @param mixed $query search query
375 375
      * @param array $options options such as page number
2  lib/Braintree/Version.php
@@ -18,7 +18,7 @@
18 18
      */
19 19
     const MAJOR = 2;
20 20
     const MINOR = 10;
21  
-    const TINY = 0;
  21
+    const TINY = 1;
22 22
 
23 23
     /**
24 24
      * @ignore
4  tests/integration/TransactionTest.php
@@ -87,7 +87,7 @@ function testSale_withAllAttributes()
87 87
                 'email' => 'dan@example.com',
88 88
                 'phone' => '419-555-1234',
89 89
                 'fax' => '419-555-1235',
90  
-                'website' => 'http://braintreepaymentsolutions.com'
  90
+                'website' => 'http://braintreepayments.com'
91 91
             ),
92 92
             'billing' => array(
93 93
                 'firstName' => 'Carl',
@@ -148,7 +148,7 @@ function testSale_withAllAttributes()
148 148
       $this->assertEquals('dan@example.com', $transaction->customerDetails->email);
149 149
       $this->assertEquals('419-555-1234', $transaction->customerDetails->phone);
150 150
       $this->assertEquals('419-555-1235', $transaction->customerDetails->fax);
151  
-      $this->assertEquals('http://braintreepaymentsolutions.com', $transaction->customerDetails->website);
  151
+      $this->assertEquals('http://braintreepayments.com', $transaction->customerDetails->website);
152 152
 
153 153
       $this->assertEquals('Carl', $transaction->billingDetails->firstName);
154 154
       $this->assertEquals('Jones', $transaction->billingDetails->lastName);

0 notes on commit 056aae8

Please sign in to comment.
Something went wrong with that request. Please try again.