Client for Maxmind's minFraud Chargeback Web Service
PHP
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
example
src
tests
.gitignore
.scrutinizer.yml
.styleci.yml
.travis.yml
CONDUCT.md
CONTRIBUTING.md
ISSUE_TEMPLATE.md
LICENSE.md
PULL_REQUEST_TEMPLATE.md
README.md
composer.json
composer.lock
phpunit.xml.dist

README.md

pachico/maxmind-minfraud-chargeback

Author php 5.4+ license Scrutinizer Code Quality Code Coverage Build Status

SensioLabsInsight

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 pachico/maxmind-minfraud-chargeback

Usage

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

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();
}

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Security

If you discover any security related issues, please email pachicodev@gmail.com instead of using the issue tracker.

Credits

License

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