PHPackages                             webstasolutions/concardis-sdk - 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. [Payment Processing](/categories/payments)
4. /
5. webstasolutions/concardis-sdk

ActiveLibrary[Payment Processing](/categories/payments)

webstasolutions/concardis-sdk
=============================

PHP Library for Concardis PayEngine 3.0

v2.0.8(1y ago)07.5k↓50%[1 PRs](https://github.com/webstasolutions/concardis-sdk/pulls)MITPHPPHP 8.0|~8.1

Since Jun 17Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/webstasolutions/concardis-sdk)[ Packagist](https://packagist.org/packages/webstasolutions/concardis-sdk)[ Docs](https://www.websta.de/)[ RSS](/packages/webstasolutions-concardis-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (13)Used By (0)

PHP SDK
=======

[](#php-sdk)

Prerequisites
-------------

[](#prerequisites)

### PHP

[](#php)

Get and install PHP for your system.

### Composer

[](#composer)

Get and install composer for your system.

### Get the PHP SDK

[](#get-the-php-sdk)

#### Via Packagist.org

[](#via-packagistorg)

```
composer require webstasolutions/concardis-sdk
```

#### By cloning

[](#by-cloning)

```
github.com:webstasolutions/concardis-sdk.git
```

#### As release zip

[](#as-release-zip)

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

[](#installation)

Uncompress the PHP SDK folder, change into the newly created folder and run

```
composer install
```

Move the PHP SDK folder into the vendor folder of your PHP project. Now you can create a php file to use the SDK with.

Initialize SDK
--------------

[](#initialize-sdk)

```
    include_once "./vendor/payengine/autoload.php";

    use \Concardis\Payengine\Lib\Payengine;
    use \Concardis\Payengine\Lib\Internal\Config\MerchantConfiguration;
    use \Concardis\Payengine\Lib\Models\Request\Customer as CustomerRequest;
    use \Concardis\Payengine\Lib\Models\Request\Customers\Persona as PersonaRequest;
    use \Concardis\Payengine\Lib\Models\Request\Customers\Address as AddressRequest;
    use \Concardis\Payengine\Lib\Models\Request\Orders\Payment\Payment;

    $config = new MerchantConfiguration();
    //TODO: Enter your API-Key
    $config->setApiKey('YOUR_API_KEY');
    // TODO: Enter your merchantId
    $config->setMerchantId('YOUR_MERCHANT_ID');
    $config->setIsLiveMode(false);

    $lib = new Payengine($config);
```

Basic Usage
-----------

[](#basic-usage)

### Create a customer

[](#create-a-customer)

```
    $customerRequest = new CustomerRequest();
    $customerRequest->setEmail('somebody@' . time() .'.org');

    $customerResponse = $lib->customer()->post($customerRequest);
```

### Create a persona

[](#create-a-persona)

```
    $personaRequest = new PersonaRequest();
    $personaRequest->setTitle("Dr.");
    $personaRequest->setGender(
        \Concardis\Payengine\Lib\Internal\Constants\Gender::MALE
    );
    $personaRequest->setFirstName("Max");
    $personaRequest->setLastName("Mustermann");
    $personaRequest->setBirthday(time());
    $personaRequest->setFax("0123456789");
    $personaRequest->setMobile("0123456789");
    $personaRequest->setPhone("0123456789");
```

### Create an address

[](#create-an-address)

```
    $addressRequest = new AddressRequest();
    $addressRequest->setFirstName("Maxim");
    $addressRequest->setLastName("Mustermann");
    $addressRequest->setZip("12345");
    $addressRequest->setStreet("Musterstrasse");
    $addressRequest->setHouseNumber("1a");
    $addressRequest->setCountry("DE");
    $addressRequest->setCity("Musterstadt");
    $addressRequest->setPhone("0123456789");
    $addressRequest->setMobile("0123456789");
    $addressRequest->setFax("0123456789");
    $addressRequest->setState("nrw");
    $addressRequest->setTitle("dr.");

    $addressResponse = $lib->customer(
    $customerResponse->getCustomerId())->addresses()->post($addressRequest);
```

### Create a preauthorization

[](#create-a-preauthorization)

```
    $payment = new Payment();
    //TODO Enter PaymentInstrumentId
    $payment->setPaymentInstrumentId('IDFromYourFrontend');

    $item = new \Concardis\Payengine\Lib\Models\Request\Orders\Item();
    $item->setQuantity(2);
    $item->setUnitPrice(5);
    $item->setUnitPriceWithTax(6);
    $item->setTotalPrice(10);
    $item->setTotalPriceWithTax(12);
    $item->setArticleNumber("test");
    $item->setName("testName");
    $item->setTax(19);

    $async = new \Concardis\Payengine\Lib\Models\Request\Orders\Async();
    $async->setSuccessUrl("http://google.de?q=success");
    $async->setCancelUrl("http://google.de?q=cancel");
    $async->setFailureUrl("http://google.de?q=failure");

    $authorizingTransaction = new \Concardis\Payengine\Lib\Models\Request\Orders\AuthorizingTransaction();
    $authorizingTransaction->setCustomer($customerResponse->getCustomerId());
    $authorizingTransaction->setPersona($personaResponse->getPersonaId());
    $authorizingTransaction->setBillingAddress(
        $addressResponse->getAddressId()
    );
    $authorizingTransaction->setShippingAddress(
        $addressResponse->getAddressId()
    );
    $authorizingTransaction->setCurrency("EUR");
    $authorizingTransaction->setPayment($payment);
    $authorizingTransaction->setBasket(array(
        $item
    ));
    $authorizingTransaction->setInitialAmount(12);
    $authorizingTransaction->setChannel('ECOM');
    $authorizingTransaction->setSource("basicUsage script");
    $authorizingTransaction->setTerms(time());
    $authorizingTransaction->setPrivacy(time());
    $authorizingTransaction->setAsync($async);
    $authorizingTransaction->setProduct(
        \Concardis\Payengine\Lib\Internal\Constants\Products::CREDITCARD
    );

    $transactionResponse = $lib->orders()->preauth()->post(
        $authorizingTransaction
    );
```

### Capture a preauthorization

[](#capture-a-preauthorization)

```
    $referencingTransaction = new \Concardis\Payengine\Lib\Models\Request\Orders\ReferencingTransaction();
    $referencingTransaction->setInitialAmount(12);
    $referencingTransaction->setCurrency("EUR");
    $referencingTransaction->setDescription("Capture everything");
    $referencingTransaction->setBasket(array(
        $item
    ));

    /* @var $preAuthTransaction \Concardis\Payengine\Lib\Models\Response\Orders\Transaction */
    $preAuthTransaction = $transactionResponse->getTransactions()[0];
    $preAuthId = $preAuthTransaction->getTransactionId();

    $captureResponse = $lib->orders(
        $transactionResponse->getOrderId()
    )->transactions($preAuthId)->capture()->post($referencingTransaction);
```

### Cancel a preauthorization

[](#cancel-a-preauthorization)

```
    $referencingTransaction = new \Concardis\Payengine\Lib\Models\Request\Orders\ReferencingTransaction();
    $referencingTransaction->setInitialAmount(12);
    $referencingTransaction->setCurrency("EUR");
    $referencingTransaction->setDescription("Capture everything");
    $referencingTransaction->setBasket(array(
        $item
    ));

    /* @var $preAuthTransaction \Concardis\Payengine\Lib\Models\Response\Orders\Transaction */
    $preAuthTransaction = $transactionResponse->getTransactions()[0];
    $preAuthId = $preAuthTransaction->getTransactionId();

    $cancelResponse = $lib->orders(
        $transactionResponse->getOrderId()
    )->transactions($preAuthId)->cancel()->post($referencingTransaction);
```

### Refund a capture or debit transaction

[](#refund-a-capture-or-debit-transaction)

```
    $referencingTransaction = new \Concardis\Payengine\Lib\Models\Request\Orders\ReferencingTransaction();
    $referencingTransaction->setInitialAmount(12);
    $referencingTransaction->setCurrency("EUR");
    $referencingTransaction->setDescription("Refund everything");
    $referencingTransaction->setBasket(array(
        $item
    ));

    $refundResponse = $lib->orders(
        $transactionResponse->getOrderId()
    )->transactions(
        $captureResponse->getTransactionId()
    )->refund()->post($referencingTransaction);
```

### GET transaction status

[](#get-transaction-status)

```
    $transactionGetResponse = $lib->orders(
        $transactionResponse->getOrderId()
    )->transactions($captureResponse->getTransactionId())->get();
```

### GET order

[](#get-order)

```
    $orderGetResponse = $lib->orders(
        $transactionResponse->getOrderId()
    )->get();
```

Tests
-----

[](#tests)

To run the tests without the integration tests call phpunit with the exclude group option.

```
phpunit tests --exclude-group integrationtests
```

Documentation
-------------

[](#documentation)

For further information, please refer to the Payengine documentation:

Licence
-------

[](#licence)

[MIT](../master/LICENSE)

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance67

Regular maintenance activity

Popularity23

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity67

Established project with proven stability

 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 ~175 days

Recently: every ~115 days

Total

9

Last Release

397d ago

PHP version history (2 changes)v2.0.0PHP ~8.0.7

v2.0.3PHP 8.0|~8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/f55e62932d1df8a7ed651325ebec393903811e6ea1704320a9a01be573d14f4d?d=identicon)[jan.blaha.websta](/maintainers/jan.blaha.websta)

---

Top Contributors

[![janblahawebsta](https://avatars.githubusercontent.com/u/85996165?v=4)](https://github.com/janblahawebsta "janblahawebsta (11 commits)")[![kazemek](https://avatars.githubusercontent.com/u/3263821?v=4)](https://github.com/kazemek "kazemek (6 commits)")[![ocean90](https://avatars.githubusercontent.com/u/617637?v=4)](https://github.com/ocean90 "ocean90 (5 commits)")[![naskor-sh](https://avatars.githubusercontent.com/u/25475005?v=4)](https://github.com/naskor-sh "naskor-sh (2 commits)")[![AndiF](https://avatars.githubusercontent.com/u/527341?v=4)](https://github.com/AndiF "AndiF (1 commits)")

---

Tags

serviceproviderpaymentecommerceconcardispayengine

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/webstasolutions-concardis-sdk/health.svg)

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

###  Alternatives

[authorizenet/authorizenet

Official PHP SDK for Authorize.Net

4729.6M46](/packages/authorizenet-authorizenet)[paymill/paymill

Paymill PHPLib

92354.6k8](/packages/paymill-paymill)[cybersource/rest-client-php

Client SDK for CyberSource REST APIs

39881.3k6](/packages/cybersource-rest-client-php)[sumup/sumup-ecom-php-sdk

SumUp PHP SDK

51277.1k1](/packages/sumup-sumup-ecom-php-sdk)[silvershop/core

Provides an ecommerce product catalog, shopping cart, and order management system

11340.0k42](/packages/silvershop-core)[commerceguys/authnet

PHP SDK for Authorize.Net API, using Guzzle.

20462.4k](/packages/commerceguys-authnet)

PHPackages © 2026

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