You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -44,37 +43,28 @@ Alternatively, we provide a custom `SPL` autoloader:
44
43
require 'path/to/anet_php_sdk/autoload.php';
45
44
```
46
45
47
-
**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`*
48
-
```php
49
-
Problem 1
50
-
- Installation request for authorizenet/authorizenet 1.8.6.2 -> satisfiable
51
-
by authorizenet/authorizenet[1.8.6.2].
52
-
- authorizenet/authorizenet 1.8.6.2 requires php ~5.3 -> your PHP version (7
53
-
.0.3RC1) or value of "config.platform.php" in composer.json does not satisfy that requirement.
54
-
```
55
-
56
46
## Authentication
57
47
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.
58
48
If you need a sandbox account you can sign up for one really easily [`here`](https://developer.authorize.net/sandbox/).
59
49
60
50
Once you have your keys simply plug them into the appropriate variables, as per the below code dealing with the authentication part of the flow.
61
51
62
52
...
63
-
````php
53
+
```php
64
54
use net\authorize\api\contract\v1 as AnetAPI;
65
-
````
55
+
```
66
56
...
67
-
````php
57
+
```php
68
58
$merchantAuthentication = new AnetAPI\MerchantAuthenticationType();
@@ -87,7 +77,7 @@ Apart from this README, you can find details and examples of using the SDK in th
87
77
### Quick Usage Example (with Charge Credit Card - Authorize and Capture)
88
78
Note: The following is a php console application. Ensure that you can invoke the php command from command line.
89
79
- Save the below code to a php file named, say, `charge-credit-card.php`
90
-
- Open command prompt and navigate to your sdk folder ( if want to run from a different folder, modify the `require` statement to have the full path to the sdk e.g. `require 'c:/anet-sdk-php/vendor/autoload.php'` in place of `require 'vendor/autoload.php'` )
80
+
- Open command prompt and navigate to your SDK folder ( if want to run from a different folder, modify the `require` statement to have the full path to the SDK e.g. `require 'c:/anet-sdk-php/vendor/autoload.php'` in place of `require 'vendor/autoload.php'` )
91
81
- Update dependecies - e.g., With composer, type `composer update`
92
82
- Type `php [<path to folder containing the php file>\]charge-credit-card.php`
SDK generates log with masking for sensitive data like credit card, expiration dates. The provided levels for logging are
141
+
The SDK generates a log with masking for sensitive data like credit card, expiration dates. The provided levels for logging are
152
142
`debug`, `info`, `warn`, `error`. Add ````use \net\authorize\util\LogFactory;````. Logger can be initialized using `$logger = LogFactory::getLog(get_class($this));`
153
143
The default log file `phplog` gets generated in the current folder. The subsequent logs are appended to the same file, unless the execution folder is changed, and a new log file is generated.
154
144
@@ -158,7 +148,7 @@ The default log file `phplog` gets generated in the current folder. The subseque
A local copy of [AuthorizedNetSensitiveTagsConfig.json](/lib/net/authorize/util/ANetSensitiveFields.php) gets generated when code invoking the logger first gets executed. The local file can later be edited by developer to re-configure what is masked and what is visible (*Do not edit the json in sdk*).
151
+
A local copy of [AuthorizedNetSensitiveTagsConfig.json](/lib/net/authorize/util/ANetSensitiveFields.php) gets generated when code invoking the logger first gets executed. The local file can later be edited by developer to re-configure what is masked and what is visible. (*Do not edit the JSON in the SDK*).
162
152
- For each element of the `sensitiveTags` array,
163
153
-`tagName` field corresponds to the name of the property in object, or xml-tag that should be hidden entirely ( *XXXX* shown if no replacement specified ) or masked (e.g. showing the last 4 digits of credit card number).
164
154
-`pattern`[<sup>[Note]</sup>](#regex-note) and `replacement`[<sup>[Note]</sup>](#regex-note) can be left `""`, if the default is to be used (as defined in [Log.php](/lib/net/authorize/util/Log.php)). `pattern` gives the regex to identify, while `replacement` defines the visible part.
0 commit comments