Download the PHP package plisio/plisio-api-php without Composer

On this page you can find all versions of the php package plisio/plisio-api-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package plisio-api-php

This PHP SDK project for Plisio Api Support

This is fully object-oriented php's composer package, developed to work with Plisio's cryptocurrency payment-gateway.

InteractionInterface methods description:

  1. getBalance(string $currency)

    Let's see yourself cryptocurrency balance in Bitcoin (BTC), for example. Also supports 9 cryptocurrencies.

    $balance = $this->interaction->getBalance(Currencies::BTC);

  2. getOperationById(string $id)

    Returns information about concrete transaction by transaction identifier, example:

    $operation = $this->interaction->getOperationById('61e9384388ecfd3ea775dfb2');

  3. getCommission(CommissionQuery $query)

    Estimates cryptocurrency fee and Plisio commission, accepts CommissionQuery class, example:

    $commission = $this->interaction->getCommission(new CommissionQuery(Currencies::BTC));

    Also commission query class has nullable parameters:

    • $addresses - Wallet address or comma separated addresses when estimating fee for mass withdrawal
    • $amounts - Amount or comma separated amount that will be sent in case of mass withdraw
    • $type - Operation type, such as: 'cash_out' or 'mass_cash_out'
    • $feePlan - The name of fee plan
  4. getCurrencyInfoByFiat(string $fiat)

    Provides current rate of exchange supported cryptocurrencies to the definite fiat currency, needs to send the request to API by the method with selected fiat currency.

    Let's get the rate of Australian Dollar (AUD), for instance. By the way, if there is not selected any of fiat currency, is rate of United States Dollar (USD), by default. The response is a list of models that consist rates of exchanges:

    $info = $this->interaction->getCurrencyInfoByFiat(FiatCurrencies::AUD);

  5. getFeePlanByPsyscid(string $psyscid)

    Returns the model with fee plans by selected cryptocurrency. Also, this model has additional fields pointed what your fee plan is.

    Example:

    $feePlan = $this->interaction->getFeePlanByPsyscid(Currencies::BTC);

  6. withdraw(WithdrawQuery $withdrawQuery) If you want to withdraw, you should call withdraw method that accepts WithdrawQueryClass:

    • $psyscid — a name of cryptocurrency;
    • $to — hash or multiple comma separated hashes pooled for the mass_cash_out;
    • $amount — any comma separated float values for the mass_cash_out in the order that hashes are in to parameter;
    • $feePlan — a name of the one of fee plans;
    • $feeRate — custom feeRate. conf_target (blocks) for BTC like cryptocurrencies or gasPrice in GWAI for ETH based cryptocurrencies;
    • $type — operation type (it's an optional parameter).

    Example:

  7. createInvoice(InvoiceQuery $invoiceQuery)

    Let us coming go to the creation of invoices, first you need to build InvoiceQuery class:

    The query needs to receive the next required parameters:

    • $currency — the name of cryptocurrency;
    • $orderName — merchant internal order name;
    • $orderNumber — merchant internal order number.

    Beside these params, there are additional such as:

    • $amount — any cryptocurrency float value. If you want to convert a fiat currency, you should skip current field and use the next two fields instead it;
    • $sourceCurrency — the name of the fiat currency;
    • $sourceAmount — any float value;
    • $allowedPsyscids — comma-separated list of cryptocurrencies that allowed for payment. Also, you will be able to select one of them. Example: 'BTC,ETH,TZEC';
    • $description — merchant invoice description;
    • $callbackUrl — merchant full URL to get invoice updates. The POST request will be sent to this URL. If this parameter isn’t set, a callback will be sent to URL that can be set under profile in API settings, that has got 'Status URL' field;
    • $email — an autofill invoice email. You will be asked to insert their email where a notification will be sent;
    • $language — en_US (now supports English only);
    • $plugin — Plisio’s internal field to determine integration plugin;
    • $version — Plisio’s internal field to determine integration plugin version.

    Example:

  8. getFee(FeeQuery $feeQuery)

    To estimate fee you should create FeeQuery class with parameters:

    • $psyscid — a name of cryptocurrency;
    • $addresses — wallet address or comma separated addresses when estimating fee for mass withdrawal;
    • $amounts — amount or comma separated amount that will be sent in case of mass withdraw;
    • $feePlan — a name of the one of fee plans (it is not required).

    Example:

Entrypoint oh php's sdk is represented with singleton-class PlisioPhpSdk, example:

Also, this sdk's provides suitable configuration possibility, you can create conf.yaml file like below:

To configure sdk's you need to create conf.yaml file in your's project-root directory and launch console command from vendor's directory:

php cli/console.php plisio-php-sdk:load-conf "path to conf.yaml file"

Sdk's has two working modes from the box (This functionality only concerns interaction with the api):

The sdk is logged in the plisio-php-sdk.log log file, for convenience, you can create a symbolic link from your root directory to this file. In the quality of the demonstration, all the functionality of the sdk (working with the test resource) is duplicated by console commands:

plisio-php-sdk:load-conf

plisio-php-sdk:test-balance

plisio-php-sdk:test-commission

plisio-php-sdk:test-create-invoice

plisio-php-sdk:test-currency-info

plisio-php-sdk:test-fee

plisio-php-sdk:test-fee-plan

plisio-php-sdk:test-operation

plisio-php-sdk:test-withdraw


All versions of plisio-api-php with dependencies

PHP Build Version
Package Version
Requires ext-curl Version *
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package plisio/plisio-api-php contains the following files

Loading the files please wait ....