承接 solidgate/php-sdk 相关项目开发

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

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

solidgate/php-sdk

最新稳定版本:v1.6.2

Composer 安装命令:

composer require solidgate/php-sdk

包简介

Php API SDK for SolidGate payment gateway

README 文档

README

PHP version

PHP SDK provides API options for integrating Solidgate’s payment orchestrator into your PHP applications.

Check our

Structure

SDK for PHP contains Table of contents
src/solidgate/ – main library source code for development
composer.json – script for managing dependencies and library imports
Requirements
Installation
Usage
Errors

Requirements

  • PHP: 7.2 or later
  • Composer: Dependency manager for PHP
  • Solidgate account: Public and secret key (request via sales@solidgate.com)

Installation

To start using the PHP SDK:

  1. Ensure you have your public and secret key.
  2. Install the SDK in your project using Composer:
    composer require solidgate/php-sdk
  3. Alternatively, add the library to your composer.json file
    {
        "require": {
            "solidgate/php-sdk": "~1.0"
        }
    }
  4. Import the installed libraries into your application.
  5. Use test credentials to validate your integration.
  6. After successful testing, request production credentials and deploy your service.
    Composer simplifies the installation and management of SDK dependencies, ensuring seamless integration.

Usage

Charge a payment

<?php

use SolidGate\API\Api;

$api = new Api('YourMerchantId', 'YourPrivateKey');

$response = $api->charge(['SomePaymentAttributes from API reference']);

Reconciliations

<?php

use SolidGate\API\Api;

$api = new Api('YourMerchantId', 'YourPrivateKey');

$dateFrom = new \DateTime("2019-01-01 00:00:00+00:00");
$dateTo = new \DateTime("2020-01-06 00:00:00+00:00");

$orderIterator = $api->getUpdatedOrders($dateFrom, $dateTo);
//$orderIterator = $api->getUpdatedChargebacks($dateFrom, $dateTo);
//$orderIterator = $api->getUpdatedAlerts($dateFrom, $dateTo);

foreach ($orderIterator as $order) {
    // process one order
}

if ($api->getException() instanceof \Throwable) {
    // save exception to log and retry request (if necessary)
}

Form resign

<?php

use SolidGate\API\Api;

$api = new Api('YourMerchantId', 'YourPrivateKey');

$response = $api->formResign(['SomePaymentAttributes from API reference']);

$response->toArray(); // pass to your Frontend

Errors

Handle errors, using a try/catch block.

try {
        $response = $api->charge([...]);
        } catch (Throwable $e) {
        error_log($e->getMessage());
}

Looking for help? Contact us
Want to contribute? Submit a pull request

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 0
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固