Skip to content

This library provides basic API options of SolidGate payment gateway.

License

Notifications You must be signed in to change notification settings

dgpankratov/php-sdk

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP version

SolidGate API

This library provides basic API options of SolidGate payment gateway.

Installation

With Composer

$ composer require solidgate/php-sdk
{
    "require": {
        "solidgate/php-sdk": "~1.0"
    }
}

Usage

Card-gate example

<?php

use SolidGate\API\Api;

$api = new Api('YourMerchantId', 'YourPrivateKey');

$response = $api->charge(['SomePaymentAttributes from API reference']);

Reconciliations example

<?php

use SolidGate\API\Api;

$api = new Api('YourMerchantId', 'YourPrivateKey');

$dateFrom = new \DateTime("2019-01-01 00:00:00+00:00");
$dateTo = new \DateTime("2020-01-06 00:00:00+00:00");

$orderIterator = $api->getUpdatedOrders($dateFrom, $dateTo);
//$orderIterator = $api->getUpdatedChargebacks($dateFrom, $dateTo);
//$orderIterator = $api->getUpdatedAlerts($dateFrom, $dateTo);

foreach ($orderIterator as $order) {
    // process one order
}

if ($api->getException() instanceof \Throwable) {
    // save exception to log and retry request (if necessary)
}

Form resign example

<?php

use SolidGate\API\Api;

$api = new Api('YourMerchantId', 'YourPrivateKey');

$response = $api->formResign(['SomePaymentAttributes from API reference']);

$response->toArray(); // pass to your Frontend

About

This library provides basic API options of SolidGate payment gateway.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%