PHPackages                             easytransac/easytransac-sdk-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. easytransac/easytransac-sdk-php

ActiveLibrary[API Development](/categories/api)

easytransac/easytransac-sdk-php
===============================

Easytransac payment gateway PHP SDK

v2.1.1(5mo ago)324.7k↓38.5%3[1 PRs](https://github.com/easytransac/easytransac-sdk-php/pulls)MITPHPPHP &gt;=7.4 &lt;9.0CI passing

Since Jan 3Pushed 3mo agoCompare

[ Source](https://github.com/easytransac/easytransac-sdk-php)[ Packagist](https://packagist.org/packages/easytransac/easytransac-sdk-php)[ RSS](/packages/easytransac-easytransac-sdk-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (35)Used By (0)

EasyTransac SDK (PHP)
=====================

[](#easytransac-sdk-php)

[![Build](https://github.com/easytransac/easytransac-sdk-php/actions/workflows/build.yml/badge.svg)](https://github.com/easytransac/easytransac-sdk-php/actions/workflows/build.yml)[![PSR12](https://github.com/easytransac/easytransac-sdk-php/actions/workflows/psr12.yml/badge.svg)](https://github.com/easytransac/easytransac-sdk-php/actions/workflows/psr12.yml)[![Test](https://github.com/easytransac/easytransac-sdk-php/actions/workflows/test.yml/badge.svg)](https://github.com/easytransac/easytransac-sdk-php/actions/workflows/test.yml)[![Coverage Status](https://github.com/easytransac/easytransac-sdk-php/raw/code_quality/coverage_badge.svg?branch=code_quality)](https://github.com/easytransac/easytransac-sdk-php/actions/workflows/coverage-badge.yml)[![Latest Stable Version](https://camo.githubusercontent.com/ad07223c01baccc796fb2602ab391f906d2adceeabe849db6a351e2f29163321/68747470733a2f2f706f7365722e707567782e6f72672f656173797472616e7361632f656173797472616e7361632d73646b2d7068702f76657273696f6e)](https://packagist.org/packages/easytransac/easytransac-sdk-php)

Make your EasyTransac API implementation easier with our SDK.

The EasyTransac SDK is a tool to process payments with the [EasyTransac API](https://www.easytransac.com/).

What's New (v2.1.1)
-------------------

[](#whats-new-v211)

- ✅ Updated SEPA Direct Debit (SDD) endpoint

    - `api/payment/debit` → `api/payment/sdd/init`
- ✅ Fixed card listing endpoint

    - `api/payment/listcards` → `api/payment/card/list`
- 🧾 Documentation updated accordingly
- ⚠️ No breaking changes in the SDK public API
- ✅ Added `setEnvironment('sandbox')` for clean sandbox/production separation
- ✅ Full PHP **7.4 to 8.4** compatibility
- ✅ Deprecated PHP 5.6 support
- ✅ Improved response helpers and strict typing
- ✅ Updated documentation

Requirements
------------

[](#requirements)

You need at least:

- PHP ≥ 7.4
- cURL in order to get clear error messages
- An API key provided by EasyTransac (register an account at [EasyTransac website](https://www.easytransac.com/))
- OpenSSL version 1.0.1 to support TLSv1.2 ciphers

Installation
------------

[](#installation)

### By composer

[](#by-composer)

```
composer require easytransac/easytransac-sdk-php
```

Or add this in your *composer.json*:

```
"require": {
  "easytransac/easytransac-sdk-php": "2.1.1"
}
```

### Manually

[](#manually)

In order to use it, you only need to require the autoload file *easytransac/easytransac-sdk-php/sdk/EasyTransac/autoload.php*.

Unit Testing
------------

[](#unit-testing)

Our test cases are written under PHPUnit. Please check the required PHPUnit version in the `composer.json` file.

Sandbox Support
---------------

[](#sandbox-support)

As of v2.0.0, the sandbox API is hosted separately at:

```
https://sandbox.easytransac.com

```

Use the new method to enable sandbox mode:

```
\EasyTransac\Core\Services::getInstance()->setEnvironment('sandbox');
```

No need to override API URLs manually.

Samples
-------

[](#samples)

### Set up the configuration

[](#set-up-the-configuration)

```
require_once(__DIR__.'/vendor/easytransac/easytransac-sdk-php/sdk/EasyTransac/autoload.php');

\EasyTransac\Core\Services::getInstance()->provideAPIKey('YOUR_API_KEY_HERE');
\EasyTransac\Core\Services::getInstance()->setEnvironment('sandbox');
\EasyTransac\Core\Services::getInstance()->setDebug(true);
\EasyTransac\Core\Services::getInstance()->setRequestTimeout(30);

\EasyTransac\Logger::getInstance()->setFilePath('YOUR_CUSTOM_PATH');
```

### Make a direct payment request

[](#make-a-direct-payment-request)

```
$customer = (new EasyTransac\Entities\Customer())
    ->setFirstname('Demo')
    ->setLastname('Mini SDK')
    ->setCity('Strasbourg')
    ->setUid('a1b2c3d4');

$card = (new EasyTransac\Entities\CreditCard())
    ->setNumber('1111111111111111')
    ->setMonth('10')
    ->setYear('2025')
    ->setCVV('123');

$transaction = (new EasyTransac\Entities\DirectTransaction())
    ->setAmount(100)
    ->setClientIp('127.0.0.1')
    ->setCustomer($customer)
    ->setCreditCard($card);

$dp = new EasyTransac\Requests\DirectPayment();
$response = $dp->execute($transaction);

if ($response->isSuccess())
{
    $transactionItem = $response->getContent();

    if ($transactionItem->getSecure())
    {
        // Use 3DS URL to complete the transaction
        echo $transactionItem->getSecureUrl();
    }
    else
    {
        var_dump($transactionItem->getStatus());
        var_dump($transactionItem->getTid());
    }
}
else
{
    var_dump($response->getErrorMessage());
}
```

### Push payment notification

[](#push-payment-notification)

```
$response = \EasyTransac\Core\PaymentNotification::getContent($_POST, $myApiKey);

var_dump($response->toArray());
var_dump($response->getStatus());
var_dump($_POST); // raw dump for debug
```

### Get base API response in JSON and Array

[](#get-base-api-response-in-json-and-array)

```
$dp = new EasyTransac\Requests\DirectPayment();
$response = $dp->execute($transaction);

var_dump($response->getRealJsonResponse()); // stdClass
var_dump($response->getRealArrayResponse()); // array
```

###  Health Score

59

—

FairBetter than 99% of packages

Maintenance76

Regular maintenance activity

Popularity33

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity92

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~105 days

Recently: every ~285 days

Total

32

Last Release

160d ago

Major Versions

1.3.7 → v2.1.02025-09-23

PHP version history (4 changes)1.0.1PHP &gt;=5.4

1.0.4PHP &gt;=5.5

1.3.0PHP &gt;=5.6

v2.1.0PHP &gt;=7.4 &lt;9.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/9802aa4ca9b868a50b327b0ad26ca3c001ea5cbcd08ca291865c59f0b6ea617c?d=identicon)[easytransac](/maintainers/easytransac)

---

Top Contributors

[![eTryp](https://avatars.githubusercontent.com/u/10864112?v=4)](https://github.com/eTryp "eTryp (21 commits)")[![Mirana-madixy](https://avatars.githubusercontent.com/u/221990126?v=4)](https://github.com/Mirana-madixy "Mirana-madixy (18 commits)")[![hakurou](https://avatars.githubusercontent.com/u/5420359?v=4)](https://github.com/hakurou "hakurou (12 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (3 commits)")[![Chonne](https://avatars.githubusercontent.com/u/208256?v=4)](https://github.com/Chonne "Chonne (2 commits)")[![maxime-killinger](https://avatars.githubusercontent.com/u/15786158?v=4)](https://github.com/maxime-killinger "maxime-killinger (2 commits)")[![Jedayh](https://avatars.githubusercontent.com/u/20578300?v=4)](https://github.com/Jedayh "Jedayh (1 commits)")

---

Tags

easytransacpayment-gatewayphpsdkphpapisdkpaymentgatewayeasytransac

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/easytransac-easytransac-sdk-php/health.svg)

```
[![Health](https://phpackages.com/badges/easytransac-easytransac-sdk-php/health.svg)](https://phpackages.com/packages/easytransac-easytransac-sdk-php)
```

###  Alternatives

[checkout/checkout-sdk-php

Checkout.com SDK for PHP

553.3M7](/packages/checkout-checkout-sdk-php)[wallee/sdk

wallee SDK for PHP

12354.2k11](/packages/wallee-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
