PHP code example of avninc / authorizenet
1. Go to this page and download the library: Download avninc/authorizenet library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
avninc / authorizenet example snippets
// $gateway is an instantiation of the AIM driver.
// $dataDescriptor and $dataValue come from the paymentr form at the front end.
$request = $gateway->purchase(
[
'notifyUrl' => '...',
'amount' => $amount,
'opaqueDataDescriptor' => $dataDescriptor,
'opaqueDataValue' => $dataValue,
...
]
);