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
While using these samples, load the appropriate dependencies of the sdk (e.g. 'composer update') and modify paths as needed (e.g. in 'require' statement) for the code to work in your system.
71
+
72
+
### Quick Usage Example (with Charge Credit Card - Authorize and Capture)
73
+
Note: The following is a php console application. Ensure that you can invoke the php command from command line.
74
+
- Save the below code to a php file named, say, `charge-credit-card.php`
75
+
- 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'` )
76
+
- Update dependecies - e.g., With composer, type `composer update`
77
+
- Type `php [<path to folder containing the php file>\]charge-credit-card.php`
78
+
79
+
```php
80
+
require 'vendor/autoload.php';
81
+
use net\authorize\api\contract\v1 as AnetAPI;
82
+
use net\authorize\api\controller as AnetController;
83
+
define("AUTHORIZENET_LOG_FILE", "phplog");
84
+
85
+
// Common setup for API credentials
86
+
$merchantAuthentication = new AnetAPI\MerchantAuthenticationType();
0 commit comments