Skip to content

Commit

Permalink
Merge pull request thephpleague#8 from 1ed/support-php-5.3
Browse files Browse the repository at this point in the history
Add php-5.3 support
  • Loading branch information
greydnls committed Oct 26, 2015
2 parents 2b8e9b0 + a753ce1 commit 45cd9b5
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 48 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
language: php

php:
- 5.3
- 5.4
- 5.5
- 5.6
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"require": {
"omnipay/common": "~2.0",
"braintree/braintree_php": "^3.1"
"braintree/braintree_php": "^2.0"
},
"require-dev": {
"omnipay/tests": "~2.0"
Expand Down
72 changes: 37 additions & 35 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/Message/AuthorizeRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function getData()
{
$this->validate('amount');

$data = [
$data = array(
'amount' => $this->getAmount(),
'billingAddressId' => $this->getBillingAddressId(),
'channel' => $this->getChannel(),
Expand All @@ -31,7 +31,7 @@ public function getData()
'shippingAddressId' => $this->getShippingAddressId(),
'taxAmount' => $this->getTaxAmount(),
'taxExempt' => $this->getTaxExempt(),
];
);

// special validation
if ($this->getPaymentMethodToken()) {
Expand Down
2 changes: 1 addition & 1 deletion src/Message/ClientTokenRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ClientTokenRequest extends AbstractRequest
{
public function getData()
{
$data = [];
$data = array();
if ($customerId = $this->getCustomerId()) {
$data['customerId'] = $customerId;
}
Expand Down
6 changes: 3 additions & 3 deletions tests/Message/AbstractRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function provideKeepsData(){
array('privateKey', 'abc123'),
array('billingAddressId', 'abc123'),
array('channel', 'abc123'),
array('customFields', ['a' => 'b']),
array('customFields', array('a' => 'b')),
array('customerId', 'abc123'),
array('descriptor', array('a' => 'b')),
array('deviceData', 'abc123'),
Expand Down Expand Up @@ -129,7 +129,7 @@ public function testCardData()

public function testOptionData()
{
$options = [
$options = array(
'addBillingAddressToPaymentMethod' => false,
'makeDefault' => true,
'failOnDuplicatePaymentMethod' => true,
Expand All @@ -139,7 +139,7 @@ public function testOptionData()
'storeShippingAddressInVault' => true,
'verifyCard' => false,
'verificationMerchantAccountId' => true,
];
);
$this->request->initialize($options);
$data = $this->request->getOptionData();

Expand Down
12 changes: 6 additions & 6 deletions tests/Message/AuthorizeRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ public function setUp()
'transactionId' => '684',
'testMode' => false,
'taxExempt' => false,
'card' => [
'card' => array(
'firstName' => 'Kayla',
'shippingCompany' => 'League',
]
)
)
);
}
Expand Down Expand Up @@ -59,10 +59,10 @@ public function testPaymentMethodToken()
'transactionId' => '684',
'testMode' => false,
'taxExempt' => false,
'card' => [
'card' => array(
'firstName' => 'Kayla',
'shippingCompany' => 'League',
],
),
'paymentMethodToken' => 'fake-token-123'
)
);
Expand All @@ -80,10 +80,10 @@ public function testPaymentMethodNonce()
'transactionId' => '684',
'testMode' => false,
'taxExempt' => false,
'card' => [
'card' => array(
'firstName' => 'Kayla',
'shippingCompany' => 'League',
],
),
'paymentMethodNonce' => 'abc123'
)
);
Expand Down

0 comments on commit 45cd9b5

Please sign in to comment.