Download the PHP package paykrypt/paykrypt-php-sdk without Composer

On this page you can find all versions of the php package paykrypt/paykrypt-php-sdk. 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 paykrypt-php-sdk

PayKrypt PHP SDK

Official PHP SDK for the PayKrypt crypto payment gateway API.

Installation

The SDK is framework-agnostic and uses PSR-18 HTTP clients. If no PSR-18 client can be auto-discovered, install one such as guzzlehttp/guzzle or symfony/http-client.

Requires PHP 8.1 or newer.

Quick Start

Configuration

All merchant API calls use:

The key decides which mode you are in, not baseUrl. A pk_test_<prefix>_<secret> key resolves to your sandbox merchant and a pk_<prefix>_<secret> key resolves to your live one, against the same host. The two cannot cross: a test key authenticating against a live merchant is rejected, and so is the reverse.

baseUrl exists to point the client at a self-hosted or local PayKrypt instance. It is not how you reach test mode.

See Test mode below.

Idempotency

PayKrypt requires an Idempotency-Key on value-creating POST endpoints. The SDK generates one automatically for:

Pass your own stable key when retrying the same app-level action:

Resources

Responses are returned as associative arrays to stay compatible with PayKrypt's evolving API response shapes.

Test mode

A pk_test_ key puts every call into your sandbox merchant. Payments there run through the real settlement pipeline, so you get the same status transitions, ledger postings and webhooks, with no blockchain involved and nothing moving on-chain.

Your sandbox key is created with your account and is permanently viewable in the dashboard, so there is no setup step.

Scenarios: detect, confirm, underpay, overpay, reject. Call pay() twice with the same txId to simulate a redelivered event and check your handler is idempotent, or twice without one to build up a multi-transaction payment.

Two things to know about these four methods:

Conversions are refused in test mode with an explanatory error rather than faked, because faking hedge accounting would report numbers that do not mean anything.

Full reference: https://docs.paykrypt.io/api/test-mode

Webhook Verification

PayKrypt signs webhook deliveries with X-PayKrypt-Signature and X-PayKrypt-Timestamp. Use the secret returned from webhooks->register(...) as PAYKRYPT_WEBHOOK_SECRET.

The signature payload is:

The SDK also accepts the older documented aliases Paykrypt-Signature and Paykrypt-Timestamp.

Error Handling

Development

Publishing To Packagist

  1. Push main to https://github.com/PayKrypt/paykrypt-php-sdk.
  2. Submit the public repository URL to Packagist once under paykrypt/paykrypt-php-sdk.
  3. Enable Packagist auto-updates through the GitHub app, or configure a GitHub webhook manually: payload URL https://packagist.org/api/github?username=PACKAGIST_USERNAME, content type application/json, secret set to your Packagist API token, and push events only.
  4. Tag releases with semantic version tags such as v1.0.0; Composer reads package versions from VCS tags, so do not add a version field to composer.json.
  5. Create a GitHub Release from the tag and verify Packagist indexed the new version.

License

MIT


All versions of paykrypt-php-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
ext-json Version *
php-http/discovery Version ^1.20
psr/http-client Version ^1.0
psr/http-factory Version ^1.1
psr/http-message Version ^1.1
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 paykrypt/paykrypt-php-sdk contains the following files

Loading the files please wait ...