Download the PHP package yasser-elgammal/tabby-php without Composer

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

Tabby PHP SDK

PHP Tests

A production-ready, framework-agnostic PHP SDK for the Tabby API.

Build Tabby checkout, payment, capture, refund, and webhook integrations without coupling your application to a specific framework.

Table of Contents

Features

Requirements

Requirement Version
PHP 8.2+
Guzzle ^7.0
ext-json Required

Installation

Install the package via Composer:

Quick Start

Configure the client, create a checkout, and redirect the customer to the URL returned by Tabby:

Configuration

Create a Configuration and pass it to TabbyClient. The merchant code and webhook secret are optional and only need to be supplied when your integration uses them.

Environments

Configure the API base URL according to the environment and region provided by Tabby for your merchant account. Keep it in server-side configuration, for example as TABBY_BASE_URL, rather than hard-coding a regional endpoint in your application.

Custom HTTP client

The client accepts any implementation of HttpClientInterface, which makes the transport replaceable and integrations straightforward to test:

Security

Never expose your Tabby secret key or webhook secret in frontend or mobile applications.

All SDK operations must be executed from your backend. Store credentials in environment variables or a secrets manager, exclude them from source control, and verify the webhook secret before processing webhook data.

API Overview

CheckoutResource

PaymentResource

WebhookResource

WebhookVerifier

Payment Lifecycle

Use the payment ID returned in CheckoutResponse::$paymentId to retrieve and manage the payment after checkout.

Services and Builders

API services send requests to Tabby and return API responses:

API Services

Fluent builders construct and locally validate the DTOs passed to those services. They do not send API requests:

Fluent Builders

Webhook verification is available separately through $tabby->webhookVerifier().

Checkout

Checkout with multiple items

Build multiple items and add them to a checkout using items():

Payments

Capture and refund

Idempotency

Capture, refund, and other mutation operations should use unique reference IDs.

Do not automatically retry mutation requests unless the same idempotent reference is reused. Reusing the same reference preserves the identity of the original operation and helps prevent accidental duplicate mutations.

Webhooks

Configure webhookSecret when constructing the client if you want to verify the secret received with webhook requests.

Register a webhook

List and retrieve webhooks

Update and delete a webhook

Verify the webhook secret

Pass the secret value received with the webhook request to the verifier before processing the request body. The SDK performs a timing-safe comparison with the configured webhookSecret.

The verifier validates a shared secret value; it does not calculate an HMAC signature from the request payload. Read the header name and delivery requirements from the webhook configuration supplied for your Tabby integration.

Error Handling

All SDK errors inherit from TabbyException.

Exception Meaning
ValidationException Invalid input detected locally before a request
ApiException Tabby API returned an error response
TransportException Network or connection failure
TabbyException Base type for any other SDK error

Validation example

Builders validate input locally when build() is called, before any request is sent:

Testing

The SDK includes a PHPUnit test suite. Inject a mock of HttpClientInterface to test your integration without calling the real API.

Run the suite:

Contributing

Contributions are welcome.

Please open an issue before submitting major changes.

Changelog

See CHANGELOG.md for release history.

Links

License

This SDK is open-source software licensed under the MIT License.


All versions of tabby-php with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
guzzlehttp/guzzle Version ^7.0
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 yasser-elgammal/tabby-php contains the following files

Loading the files please wait ...