定制 ownage/approvedeny-sdk-php 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

ownage/approvedeny-sdk-php

最新稳定版本:1.0.0

Composer 安装命令:

composer require ownage/approvedeny-sdk-php

包简介

README 文档

README

Latest Version on Packagist Total Downloads GitHub Actions

The ApproveDeny SDK for PHP provides an easy way to interact with the ApproveDeny API using PHP.

Installation

Requires PHP 8.1+

You can install the package via composer:

composer require ownage/approvedeny-sdk-php

Usage

To use the SDK, you need to create an instance of the approvedeny Client class. You can do this by passing your API key to the constructor.

use Ownage\ApproveDeny\Client;

$client = new Client('your-api-key');

Creating a new check request

To create a new check request, you need to call the createCheckRequest method on the client instance.

$checkRequest = $client->createCheckRequest('check-id', [
    'description' => 'A description of the check request',  
    'metadata' => [
        'key' => 'value',
    ],
]);

Retrieving a check request

To retrieve a check request, you need to call the getCheckRequest method on the client instance.

$checkRequest = $client->getCheckRequest('check-request-id');

Retrieving a check request response

To retrieve a check request response, you need to call the getCheckRequestResponse method on the client instance.

$checkRequestResponse = $client->getCheckRequestResponse('check-request-id');

Verifying webhook signatures

To verify webhook signatures, you need to call the isValidWebhookSignature method on the client instance. This method returns a boolean value indicating whether the signature is valid or not.

$isValidSignature = $client->isValidWebhookSignature('your-encryption-key', 'signature', ['foo' => 'bar']);

if ($isValidSignature) {
    // The signature is valid
} else
    // The signature is invalid
}

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please use the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-08-07