PHPackages                             victoralagwu/cardconnect - 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. victoralagwu/cardconnect

ActiveLibrary[API Development](/categories/api)

victoralagwu/cardconnect
========================

PHP adapter for CardConnect CardPointe API

v1.0.0(1y ago)0154MITPHPPHP ^7.3|^8.0

Since Nov 4Pushed 1y agoCompare

[ Source](https://github.com/VictorAlagwu/CardConnect)[ Packagist](https://packagist.org/packages/victoralagwu/cardconnect)[ Docs](https://github.com/VictorAlagwu/CardConnect)[ RSS](/packages/victoralagwu-cardconnect/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (4)Used By (0)

PHP CardConnect Adapter
=======================

[](#php-cardconnect-adapter)

Initializing
------------

[](#initializing)

```
$merchant_id = '123456123456';
$user        = 'username';
$pass        = 'password';
$server      = 'https://sub.domain.tld:1111/';

$client = new CardPointe($merchant_id, $user, $pass, $server);
```

Testing Credentials
-------------------

[](#testing-credentials)

```
$boolean = $client->testAuth();
```

Validate Merchant ID
--------------------

[](#validate-merchant-id)

```
$boolean = $client->validateMerchantId();
```

Tweaks
------

[](#tweaks)

Responses are parsed and their amount fields are returned in cents `int`.

The client stores the last request made as an `array` `$client->last_request` which can be used to debug requests

Response Objects
----------------

[](#response-objects)

Responses are returned as objects and can be accessed as arrays.

```
$response = $client->inquire($retref);
$response->amount; // returns int
$response->toJSON(); // Returns JSON encoded string, accepts format codes (JSON_PRETTY_PRINT, etc)
$response->toArray(); // Returns array of attributes
```

Authorizing Transactions
------------------------

[](#authorizing-transactions)

```
$request = new AuthorizationRequest([
    'account' => '4242424242424242',
    'amount'  => '100',
    'expiry'  => '0120',
]);
$authorization_response = $client->authorize($request);
```

**You can also authorize and capture in the same request like so**

```
$request = new AuthorizationRequest([
    'account' => '4242424242424242',
    'amount'  => '100',
    'expiry'  => '0120',
    'capture' => 'Y', // OR 'capture' => true,
    'profile' => 'Y', // OR 'profile' => true,
]);
$capture_response = $client->authorize($request);
```

**You can also authorize and capture in the same request using a saved card with PROFILE\_ID/ACCOUNT\_ID like so**

```
$request = new AuthorizationRequest([
    'account' => '4242424242424242',
    'amount'  => '100',
    'expiry'  => '0120',
    'capture' => 'Y', // OR 'capture' => true,
    'profile' => "$profile_id/$account_id", // using a profile/account
]);
$capture_response = $client->authorize($request);
```

To view all available fields see [Authorization Request](https://developer.cardconnect.com/cardconnect-api#authorization-request)

All returned fields see [Authorization Response](https://developer.cardconnect.com/cardconnect-api#authorization-response)

Capturing Transactions
----------------------

[](#capturing-transactions)

```
$auth_retref = '123456654321';
$params = []; // optional
$capture_response = $client->capture($auth_retref, $params);
```

To view all available fields see [Capture Request](https://developer.cardconnect.com/cardconnect-api#capture-request)

All returned fields see [Capture Response](https://developer.cardconnect.com/cardconnect-api#capture-response)

Voiding Transactions
--------------------

[](#voiding-transactions)

```
$auth_retref = '123456654321';
$params = []; // optional
$void_response = $client->void($auth_retref, $params);
```

To view all available fields see [Void Request](https://developer.cardconnect.com/cardconnect-api#void-request)

All returned fields see [Void Response](https://developer.cardconnect.com/cardconnect-api#void-response)

Refunding Transactions
----------------------

[](#refunding-transactions)

```
$capture_retref = '123456654321';
$params = []; // optional
$void_response = $client->refund($capture_retref, $params);
```

To view all available fields see [Refund Request](https://developer.cardconnect.com/cardconnect-api#refund-request)

All returned fields see [Refund Response](https://developer.cardconnect.com/cardconnect-api#refund-response)

Transaction Status
------------------

[](#transaction-status)

```
$retref = '123456654321';
$inquire_response = $client->inquire($retref);
```

All returned fields see [Inquire Response](https://developer.cardconnect.com/cardconnect-api#inquire-response)

Settlement Status
-----------------

[](#settlement-status)

```
$date = '0118';
$settlements = $client->settleStat($date);
$first_settlement = $settlements[0];
```

All returned fields see [Settlement Response](https://developer.cardconnect.com/cardconnect-api#settlement-response)

Create/Update Profile
---------------------

[](#createupdate-profile)

```
// update a profile by providing 'profile' => $profile_id in the request
$request = [
    'defaultacct' => "Y",
    'account'     => "4444333322221111",
    'expiry'      => "0914",
    'name'        => "Test User",
    'address'     => "123 Test St",
    'city'        => "TestCity",
    'region'      => "TestState",
    'country'     => "US",
    'postal'      => "11111",
];
$res = $client->createProfile($request);
```

All returned fields see [Create/Update Profile Request](https://developer.cardconnect.com/cardconnect-api?lang=php#create-update-profile-response)

Get Profile
-----------

[](#get-profile)

```
$profile_id = '1023456789';
$account_id = null; // optional
$profile = $client->profile($profile_id, $account_id);
```

All returned fields see [Profile Response](https://developer.cardconnect.com/cardconnect-api?lang=php#get-profile-response)

Delete Profile
--------------

[](#delete-profile)

```
$profile_id = '1023456789';
$account_id = null; // optional
$profile = $client->deleteProfile($profile_id, $account_id);
```

All returned fields see [Delete Profile Response](https://developer.cardconnect.com/cardconnect-api?lang=php#delete-profile-response)

Tests
-----

[](#tests)

`composer test`

Note: small or large authorization/capture amounts don't seem to work with the test merchant credentials.

Future stuff
------------

[](#future-stuff)

Implement remains service endpoints

- Funding Service
- Signature Capture Service (probably never)
- Open Batch Service
- Close Batch Service
- BIN Service

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 60% of commits — single point of failure

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

Unknown

Total

1

Last Release

554d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/636abf2876d8503233266e4bbec15a6ee8ad5bec14baf825a5fa9833b60af619?d=identicon)[VictorAlagwu](/maintainers/VictorAlagwu)

---

Top Contributors

[![Dewbud](https://avatars.githubusercontent.com/u/24578927?v=4)](https://github.com/Dewbud "Dewbud (18 commits)")[![VictorAlagwu](https://avatars.githubusercontent.com/u/15857679?v=4)](https://github.com/VictorAlagwu "VictorAlagwu (6 commits)")[![rrpadilla](https://avatars.githubusercontent.com/u/6921286?v=4)](https://github.com/rrpadilla "rrpadilla (4 commits)")[![blazerunner44](https://avatars.githubusercontent.com/u/12058167?v=4)](https://github.com/blazerunner44 "blazerunner44 (1 commits)")[![lkagan](https://avatars.githubusercontent.com/u/7658537?v=4)](https://github.com/lkagan "lkagan (1 commits)")

---

Tags

cardconnectcardpointe

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/victoralagwu-cardconnect/health.svg)

```
[![Health](https://phpackages.com/badges/victoralagwu-cardconnect/health.svg)](https://phpackages.com/packages/victoralagwu-cardconnect)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[dewbud/cardconnect

PHP adapter for CardConnect CardPointe API

1290.3k](/packages/dewbud-cardconnect)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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