PHP code example of pachico / maxmind-minfraud-chargeback
1. Go to this page and download the library: Download pachico/maxmind-minfraud-chargeback 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/ */
pachico / maxmind-minfraud-chargeback example snippets
use Pachico\MaxMind\MinFraudChargeback\Chargeback;
use Pachico\MaxMind\MinFraudChargeback\Manager;
use Pachico\MaxMind\MinFraudChargeback\Auth\Credential;
$chargeback = new Chargeback('77.77.77.77');
$chargeback->setChargebackCode('CHARGEBACK_STRING')
->setFraudScore(Chargeback::SUSPECTED_FRAUD)
->setMaxmindId('XXXXXXXX')
->setMinfraudId('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx')
->setTransactionId('XXXXXX');
$manager = new Manager(new Credential('XXXXX', 'XXXXXXXXXXXX'));
$manager->setConnectTimeout(1)
->setTimeout(1);
try {
$manager->report($chargeback);
} catch (Exception $exc) {
echo $exc->getMessage();
}