承接 securionpay/securionpay-php 相关项目开发

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

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

securionpay/securionpay-php

最新稳定版本:v2.6.0

Composer 安装命令:

composer require securionpay/securionpay-php

包简介

SecurionPay PHP Library

README 文档

README

This library is deprecated. Please use Shift4 PHP Library.

SecurionPay PHP Library

If you don't already have SecurionPay account you can create it here.

Installation

Composer

Best way to use this library is via Composer.

To do this you will need to add this configuration to your composer.json:

{
  "require": {
    "securionpay/securionpay-php": "^2.5.0"
  }
}

Then to use the library, you can use Composer's autoloader:

require_once('vendor/autoload.php');

Manual installation

If you don't want to use Composer then you can download the latest release.

Then to use the library, you can either configure your autoloader to load classes from the lib/ directory or use included autoloader:

 require_once 'lib/SecurionPay/Util/SecurionPayAutoloader.php';
 \SecurionPay\Util\SecurionPayAutoloader::register();

Quick start example

use SecurionPay\SecurionPayGateway;
use SecurionPay\Exception\SecurionPayException;

$gateway = new SecurionPayGateway('sk_test_[YOUR_SECRET_KEY]');

$request = array(
    'amount' => 499,
    'currency' => 'EUR',
    'card' => array(
        'number' => '4242424242424242',
        'expMonth' => 11,
        'expYear' => 2022
    )
);

try {
    $charge = $gateway->createCharge($request);

    // do something with charge object - see https://securionpay.com/docs/api#charge-object
    $chargeId = $charge->getId();

} catch (SecurionPayException $e) {
    // handle error response - see https://securionpay.com/docs/api#error-object
    $errorType = $e->getType();
    $errorCode = $e->getCode();
    $errorMessage = $e->getMessage();
}

Documentation

For further information, please refer to our official documentation at https://securionpay.com/docs.

统计信息

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

GitHub 信息

  • Stars: 13
  • Watchers: 5
  • Forks: 11
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-05-28