slowprog/maxmind-minfraud-chargeback

Client for Maxmind's minFraud Chargeback Web Service.

1.0.0 2019-11-11 12:41 UTC

This package is auto-updated.

Last update: 2024-04-11 22:24:51 UTC


README

Build Status

This is a client for MaxMind's minFraud Chargeback Web Service Api.

This is NOT an official implementation, although it was written following official documentation.

Install

Via Composer

$ composer require slowprog/maxmind-minfraud-chargeback

Usage

Please read http://dev.maxmind.com/minfraud/chargeback/

use MaxMind\MinFraudChargeback\Chargeback;
use MaxMind\MinFraudChargeback\Manager;
use MaxMind\MinFraudChargeback\Auth\Credential;

$chargeback = new Chargeback('77.77.77.77');
$chargeback->setChargebackCode('CHARGEBACK_STRING')
    ->setTag(Chargeback::TAG_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();
}

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CONDUCT for details.

License

The MIT License (MIT). Please see License File for more information.