gazmendsahiti / ccpointe

CcPointe是一个轻量级的包/库,用于以简单/流畅的方式与CardConnect的API CardPointe进行交互。

dev-main 2022-08-26 13:07 UTC

This package is auto-updated.

Last update: 2024-09-26 17:54:01 UTC


README

CcPointe是一个轻量级的包/库,用于以简单/流畅的方式与CardConnect的API (CardPointe) 进行交互。

通过composer安装

运行需要PHP >= 8.1

composer require gazmendsahiti/ccpointe

可用方法列表

为了尽快开始,请查看CardPointe的文档,您可能看到在所有实例中都需要merchid,我已经处理了这一点,您不需要传递该参数。注意:配置文件的端点用于创建配置文件、获取配置文件、更新配置文件和删除配置文件。

_________________________________________
| ENDPOINT          | METHOD            | 
|___________________|___________________|
| inquireMerchant   | inquireMerchant   |
| auth              | authorization     |
| capture           | capture           |
| void              | void              |
| refund            | refund            |
| inquire           | inquire           |
| inquireByOrderId  | inquireByOrderId  |
| voidByOrderId     | voidByOrderId     |
| settlestat        | settlementStatus  |
| funding           | funding           |
| profile           | createProfile     | 
| profile           | getProfile        |
| profile           | updateProfile     | 
| profile           | deleteProfile     | 
| sigcap            | signatureCapture  |
| bin               | bin               |
|_______________________________________|

代码示例

要使用CcPointe,首先在您的类/文件中使用以下方式包含它:

use gazmendsahiti\CcPointe\CardPointe;
$cardPointe = new CardPointe($serviceUrl, $username, $password, $merchId);

$response = $cardPointe->authorization([
    'amount' => 255,
    // other parameters...
]);

// You can transform response to object or array
$objectResponse = $response->toObject();
$arrayResponse = $response->toArray()

// raw response from api
$raw = $response->rawResponse();

许可证

MIT