crazysnowflake/payop-test

1.0.0 2022-05-02 15:24 UTC

This package is auto-updated.

Last update: 2024-04-06 00:30:02 UTC


README

To install, either run

$ php composer.phar require crazysnowflake/payop-test "^1.0@dev"

or add

"crazysnowflake/payop-test": "^1.0@dev"

to the require section of your composer.json file.

Usage

use Crazysnowflake\PayopTest\PayopTest;

$client = new PayopTest($public_key, $secret_key, $jwt_token);
try {
    $invoiceID = $client->setPaymentMethod($method)
                        ->setInvoiceResultUrl('Some Url')
                        ->setInvoiceFailPath('Some Url')
                        ->createInvoice($order, $customer);

    $card_token = $client->createCardToken($invoiceID, $card);

    $result = $client->setCheckStatusUrl('Some Url')
                     ->checkout($invoiceID, $customer, $card_token['token']);

    $transaction = $client->getTransaction($result['txid']);
    $status      = $client->checkInvoiceStatus($invoiceID);
} catch (\GuzzleHttp\Exception\GuzzleException $e) {
}

More examples see in index.php

License

payop-test is released under the MIT License. See the bundled LICENSE.md for details.