gingdev/ipay

1.0.1 2024-10-17 12:19 UTC

This package is not auto-updated.

Last update: 2024-11-22 04:26:50 UTC


README

static analysis tests

<?php

declare(strict_types=1);

use IPay\Enum\TransactionType;
use IPay\IPayClient;

require __DIR__.'/vendor/autoload.php';

try {
    $session = IPayClient::fromCredentials('username', 'password');

    $transactions = $session->transactions()
        ->type(TransactionType::CREDIT)
        ->today()
        ->getIterator();

    foreach ($transactions as $transaction) {
        echo $transaction->remark.PHP_EOL;
    }
} catch (Throwable $e) {
    echo $e->getMessage();
}