Skip to content

Commit 2b41c27

Browse files
committed
Merge pull request #107 from AuthorizeNet/future
Updating for PHP7 Compat
2 parents 04e3c34 + 939963e commit 2b41c27

4 files changed

Lines changed: 16 additions & 2 deletions

File tree

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ language: php
22

33
php:
44
- 5.6
5+
- 7.0
56

67
sudo: false
78

89
before_script:
910
- pecl install xmldiff
10-
- composer install --prefer-dist --dev
11+
- composer install --prefer-dist --ignore-platform-reqs
1112
- chmod +x ./test-sample-codes.sh
1213
- git submodule update --recursive
1314

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ require 'vendor/autoload.php';
2727
```
2828
*Note: you'll need a composer.json file with the following require section and to run
2929
`composer update`.*
30+
3031
```json
3132
{
3233
"require": {
@@ -52,6 +53,15 @@ Alternatively, we provide a custom `SPL` autoloader:
5253
require 'path/to/anet_php_sdk/autoload.php';
5354
```
5455

56+
**Issue with PHP 7:** *You may get below error when run the composer update with PHP 7. To get rid of this error, use `composer update --ignore-platform-reqs`*
57+
```php
58+
Problem 1
59+
- Installation request for authorizenet/authorizenet 1.8.6.2 -> satisfiable
60+
by authorizenet/authorizenet[1.8.6.2].
61+
- authorizenet/authorizenet 1.8.6.2 requires php ~5.3 -> your PHP version (7
62+
.0.3RC1) or value of "config.platform.php" in composer.json does not satisfy that requirement.
63+
```
64+
5565
## Authentication
5666
To authenticate with the Authorize.Net API you will need to retrieve your API Login ID and Transaction Key from the [`Merchant Interface`](https://account.authorize.net/). You can find these details in the Settings section.
5767
If you need a sandbox account you can sign up for one really easily [`here`](https://developer.authorize.net/sandbox/).

classmap.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@
182182
'PhpOption\None' => $vendorDir . '/phpoption/phpoption/src/PhpOption/None.php',
183183
'PhpOption\Option' => $vendorDir . '/phpoption/phpoption/src/PhpOption/Option.php',
184184
'PhpOption\Some' => $vendorDir . '/phpoption/phpoption/src/PhpOption/Some.php',
185+
'Symfony\Component\Yaml\Yaml' => $vendorDir . '/Symfony/Yaml/Yaml.php',
186+
'Symfony\Component\Yaml\Parser' => $vendorDir . '/Symfony/Yaml/Parser.php',
187+
'Symfony\Component\Yaml\Inline' => $vendorDir . '/Symfony/Yaml/Inline.php',
185188

186189
'AuthorizeNetAIM' => $libDir . 'AuthorizeNetAIM.php',
187190
'AuthorizeNetAIM_Response' => $libDir . 'AuthorizeNetAIM.php',

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"license": "proprietary",
77
"homepage": "http://developer.authorize.net",
88
"require": {
9-
"php": "~5.3",
9+
"php": "~5.3 || ~7.0",
1010
"ext-curl": "*",
1111
"ext-json": "*",
1212
"ext-simplexml": "*",

0 commit comments

Comments
 (0)