code-wallet/client

Code Wallet PHP 客户端

v1.0.0 2023-11-06 23:32 UTC

This package is not auto-updated.

Last update: 2024-09-25 02:07:32 UTC


README

Code SDK - PHP

代码 SDK - PHP

Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require

Code PHP SDK 是一个库,它使 PHP 开发者能够轻松地将 Code 支付集成到他们的应用程序中。只需几行代码和最小设置,您就可以轻松接受支付。

有关详细信息,请参阅文档

什么是 Code?

Code 是一个利用自托管区块链技术提供即时、全球和私密支付服务的移动钱包应用程序。

安装

您可以通过 Composer 安装 Code PHP SDK

composer require code-wallet/client

使用方法

以下是一个快速示例,演示如何使用 PHP SDK 创建和验证支付意图

<?php

require 'vendor/autoload.php';

use CodeWallet\Client\PaymentIntents;

$testData = [
    'destination' => "E8otxw1CVX9bfyddKu3ZB3BVLa4VVF9J7CTPdnUwT9jR",
    'amount' => 0.05,
    'currency' => 'usd',
];

// Create a payment request intent
$response = PaymentIntents::create($testData);

// After some time, you can verify the status of the intent
$status = PaymentIntents::getStatus($response['id']);

echo $status;

获取帮助

如果您有任何问题或需要帮助将 Code 集成到您的网站或应用程序中,请通过 DiscordTwitter 联系我们。

贡献

目前,最佳贡献方式是在 Discord 上分享反馈。随着我们继续构建平台并开放更多贡献方式,这将会发展。