Skip to content

Commit

Permalink
2.10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
braintreeps committed Jun 16, 2011
1 parent 81bcfef commit 056aae8
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 19 deletions.
4 changes: 4 additions & 0 deletions 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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -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

Expand Down
13 changes: 8 additions & 5 deletions lib/Braintree.php
Expand Up @@ -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();
4 changes: 2 additions & 2 deletions lib/Braintree/CreditCard.php
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions lib/Braintree/Customer.php
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/Braintree/Error/Validation.php
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/Braintree/Error/ValidationErrorCollection.php
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions lib/Braintree/Http.php
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion lib/Braintree/Subscription.php
Expand Up @@ -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
*
Expand Down
6 changes: 3 additions & 3 deletions lib/Braintree/Transaction.php
Expand Up @@ -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',
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/Braintree/Version.php
Expand Up @@ -18,7 +18,7 @@ final class Braintree_Version
*/
const MAJOR = 2;
const MINOR = 10;
const TINY = 0;
const TINY = 1;

/**
* @ignore
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/TransactionTest.php
Expand Up @@ -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',
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 056aae8

Please sign in to comment.