Download the PHP package tapsilat/tapsilat-php without Composer

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

Tapsilat Client SDK for PHP

CI Packagist Packagist Downloads

Create orders and retrieve secure checkout URLs.

Requires PHP 7.4+

Installation

You can install the package via Composer:

or

Usage

Environment Setup

Create a .env file:

TapsilatAPI Initialization

Validators

The SDK includes built-in validators for common data types:

GSM Number Validation

Installments Validation

Order Create Process

Get Order Details

Get Order Details by Conversation ID

Get Order List

Get Order Submerchants

Get Checkout URL

Order Cancel Process

Order Refund Process

Order Refund All Process

Get Order Payment Details

Get Order Status

Get Order Transactions

Charge Order

Get Order Payments

getAllOrdersPayments() is deprecated: the API has no route for it. List one order's payments instead:

Get Order Term

Create Order Term

order_id is the order's ID (from order creation), not its reference ID. Term dates use YYYY-MM-DD.

Delete Order Term

Update Order Term

An update replaces the term, so send every field.

Refund Order Term

Terminate Order

Manual Callback for Order

Order Related Reference Update

Get Organization Settings

Organization Management

getOrganizationLimits(), getOrganizationLimitUser() and setOrganizationLimitUser() are deprecated: the API has no such routes.

Health Monitoring

Submerchant Management

Document Export (PDF & Excel)

Card Installments

Submerchant Settlement and Payout Events

Virtual POS

A VPOS update replaces the whole configuration (fields left out are stored as empty or false), so read it first and send every field back.

Saved Cards

Marketplace (API v2)

Marketplace calls use the /api/v2 URL derived from the base URL. Seller and payout revisions are opaque strings: send them back exactly as received.

Tapsilat Elements Sessions

Tapsilat Elements is the native Android and iOS card sheet. Your backend creates a session with its secret API key and passes only the session's client_secret to the app, which opens the sheet with it. Card data goes from the sheet to Tapsilat encrypted and never reaches your backend.

A pay session needs order_reference_id. A tokenize session saves a card for user_id, with mode set to MODE_SECURE (3D Secure), MODE_HALF_SECURE or MODE_NON_SECURE. A session's status is one of the ElementsSession::STATUS_ constants (requires_payment_method, processing, requires_action, succeeded, failed, expired, canceled), and getLastError() says why the last attempt failed. cancelElementsSession() returns a session that is confirming or has completed unchanged.

Only createElementsSession() returns the client secret. var_dump() and print_r() show it as [redacted], while toArray() and json_encode() keep it so that you can send it to the app. Errors carry a stable code, such as elements_not_enabled (403), session_not_found (404) or unavailable (503), and retryable.

Error Handling

API errors throw Tapsilat\APIException with the HTTP status (statusCode), the body's code, the message (error, from the body's message or error), per-field errors, the body's status, the raw body (rawBody) and retryable, true when the error says the request can be retried. Elements routes nest the error as {"error": {"code": "...", "message": "...", "retryable": true}}; code, error and retryable are read from that object. A response that is not JSON, such as an HTML page from a wrong base URL, also throws.

System & Webhooks

Get System Definitions and Statuses

Get System Config

Webhook Handling

Verify Webhook Signature

Tapsilat signs every callback it sends to your callback URLs, and to an order's payment_success_url and payment_failure_url, with the webhook secret from the panel's callback settings. The Tapsilat-Signature header looks like t=1726480000,v1=5257a8…: v1 is the hex HMAC-SHA256 of the timestamp, a dot and the raw body.

verifyWebhook checks it in constant time and rejects a timestamp more than 5 minutes from the server clock, so a captured callback cannot be replayed. Pass the raw body, not re-encoded JSON.

A different tolerance in seconds can be passed as the fourth argument (0 disables the timestamp check). A bare hex HMAC of the body, with or without a sha256= prefix, is still accepted for signatures made the way earlier SDK versions documented.

Order Statuses

Tapsilat\OrderStatus has the numeric status codes that callbacks carry, the names getOrderStatus() returns, and the groups most integrations need:

Subscription Operations

Create Subscription

Get Subscription

List Subscriptions

Cancel Subscription

Redirect Subscription

Requirements

License

The MIT License (MIT). Please see License File for more information.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Testing

The SDK includes comprehensive unit and integration tests.

Environment Setup

For integration tests, create a .env file in the project root:

Running Tests

Test Structure

Test Coverage

CI/CD

This package uses GitHub Actions for continuous integration and deployment:

To create a new release:

This will automatically:

  1. Create a GitHub release
  2. Publish the package to Packagist
  3. Make it available via composer require tapsilat/tapsilat-php

Docker Development

This package includes Docker support for easy development setup.

Quick Start

Available Commands

Manual Docker Commands


All versions of tapsilat-php with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
vlucas/phpdotenv Version ^5.5
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 tapsilat/tapsilat-php contains the following files

Loading the files please wait ...