承接 victoralagwu/cardconnect 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

victoralagwu/cardconnect

Composer 安装命令:

composer require victoralagwu/cardconnect

包简介

PHP adapter for CardConnect CardPointe API

README 文档

README

Initializing

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

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

Testing Credentials

$boolean = $client->testAuth();

Validate Merchant ID

$boolean = $client->validateMerchantId();

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

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

$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

All returned fields see Authorization Response

Capturing Transactions

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

To view all available fields see Capture Request

All returned fields see Capture Response

Voiding Transactions

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

To view all available fields see Void Request

All returned fields see Void Response

Refunding Transactions

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

To view all available fields see Refund Request

All returned fields see Refund Response

Transaction Status

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

All returned fields see Inquire Response

Settlement Status

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

All returned fields see Settlement Response

Create/Update 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

Get Profile

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

All returned fields see Profile Response

Delete Profile

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

All returned fields see Delete Profile Response

Tests

composer test

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

Future stuff

Implement remains service endpoints

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

victoralagwu/cardconnect 适用场景与选型建议

victoralagwu/cardconnect 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 372 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 11 月 04 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「cardconnect」 「cardpointe」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 victoralagwu/cardconnect 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 victoralagwu/cardconnect 我们能提供哪些服务?
定制开发 / 二次开发

基于 victoralagwu/cardconnect 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 372
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 12
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 13
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-11-04