aboodma/gosell-sdk-php-8 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

aboodma/gosell-sdk-php-8

Composer 安装命令:

composer require aboodma/gosell-sdk-php-8

包简介

Tap Payemnt PHP

README 文档

README

PHP from Packagist (specify version) Latest Stable Version Build Status Total Downloads License Coverage Status

GoSell PHP SDK

Official bindings to GoSell API.

Note: Detailed REST API request and response schema can be found at API Documentation

Requirements

This library supports PHP 5.6 and later.

Installation

The recommended way to install GoSell PHP SDK is through Composer:

composer require tappayments/gosell

To use the bindings, use Composer's autoload:

require_once('vendor/autoload.php');

Manual Installation

If you do not wish to use Composer, you can download the latest release. Then, to use the bindings, include the vendor.php file.

require_once('/pathto/Tap-Payments/gosell-sdk-php/vendor/autoload.php');

Getting Started

use TapPayments\GoSell;

  
//set yout secret key here
GoSell::setPrivateKey("sk_test_XKokBfNWv6FIYuTMg5sLPjhJ");

  

$charge = GoSell\Charges::create(
	[
      "amount"=> 1,
      "currency"=> "KWD",
      "threeDSecure"=> true,
      "save_card"=> false,
      "description"=> "Test Description",
      "statement_descriptor"=> "Sample",
      "metadata"=> [
        "udf1"=> "test 1",
        "udf2"=> "test 2"
      ],
      "reference"=> [
        "transaction"=> "txn_0001",
        "order"=> "ord_0001"
      ],
      "receipt"=> [
        "email"=> false,
        "sms"=> true
      ],
      "customer"=> [
        "first_name"=> "test",
        "middle_name"=> "test",
        "last_name"=> "test",
        "email"=> "test@test.com",
        "phone"=> [
          "country_code"=> "965",
          "number"=> "50000000"
        ]
      ],
      "source"=> [
        "id"=> "src_all"
      ],
      "post"=> [
        "url"=> "http://your_website.com/post_url"
      ],
      "redirect"=> [
        "url"=> "http://your_website.com/redirect_url"
      ]
    ]
);

  

echo '<pre>';
var_dump($charge); //will give charge response as PHP object

Code samples

More Help

统计信息

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

GitHub 信息

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

其他信息

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