uduncloud/udun-wallet-sdk 问题修复 & 功能扩展

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

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

uduncloud/udun-wallet-sdk

Composer 安装命令:

composer require uduncloud/udun-wallet-sdk

包简介

udun-wallet-sdk

README 文档

README

udun-sdk-php

安装

方式1:命令安装

	composer require uduncloud/udun-wallet-sdk

方式2:composer 配置安装

1,在composer.json添加如下配置

{
	"require":{
		"uduncloud/udun-wallet-sdk": "^1.0"
	}
}

2,执行命令

	composer install

使用

1,新建UdunController.php

	use udun\Dispatch\UdunDispatch;

	class UdunController{
		protected $udunDispatch ;
		public function __construct()
	    {
	       	// 控制器初始化
	       	$this->initialize();
	    }
	    protected function initialize(){
	    	$this->udunDispatch = new UdunDispatch([
	            'merchant_no' => 30000, //商户号
	            'api_key' => 'c789xxxxxxxxxxxxxxxxx388ecxxx',//apikey
	            'gateway_address'=>'https://sig11.udun.io', //节点
	            'callUrl'=>'https://localhost/callUrl', //回调地址
	            'debug' => false  //调试模式
	        ]);
	    }
	}

2,在需要使用到接口的类继承 UdunController

	##使用示例
	namespace xxxx;
	class Index extends UdunController{
		//查询支持的交易对
		public function supportCoins()
	    {
	    	$result =  $this->udunDispatch->supportCoins(true);
	        return json($result);
	    }


	    //创建地址
		public function createAddress()
	    {
	    	$result =  $this->udunDispatch->createAddress('195');
	        return json($result);
	    }

	    //验证地址合法性
		public function checkAddress()
	    {
	    	$result =  $this->udunDispatch->checkAddress('195','TEpK1aWkjDue6j8reeeMqG7hdJ5tRytyAF');
	        return json($result);
	    }

	    //查询地址是否存在
		public function existAddress()
	    {
	    	$result =  $this->udunDispatch->existAddress('195','TEpK1aWkjDue6j8reeeMqG7hdJ5tRytyAF');
	        return json($result);
	    }

	    //申请提币
		public function withdraw()
	    {
	    	$result =  $this->udunDispatch->withdraw('sn00001','195','195','TEpK1aWkjDue6j8reeeMqG7hdJ5tRytyAF',10);
	        return json($result);
	    }

	    //交易回调
		public function callback()
	    {
	    	$result =  $this->udunDispatch->callback();
	        return json($result);
	    } 

	}

其他

##curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to raw.githubusercontent.com:443
如果提示以上错误需要添加ca证书
##php.ini  打开ssl
extension=php_openssl.dll;
##证书路径
openssl.cafile=D:\cacert.pem

uduncloud/udun-wallet-sdk 适用场景与选型建议

uduncloud/udun-wallet-sdk 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3.35k 次下载、GitHub Stars 达 15, 最近一次更新时间为 2022 年 07 月 29 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 uduncloud/udun-wallet-sdk 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 uduncloud/udun-wallet-sdk 我们能提供哪些服务?
定制开发 / 二次开发

基于 uduncloud/udun-wallet-sdk 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 15
  • Watchers: 1
  • Forks: 10
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-07-29