Skip to content

yansongda/hyperf-pay

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
September 24, 2022 16:14
July 9, 2021 23:11
July 9, 2021 23:11
July 9, 2021 23:11
July 9, 2021 23:11
July 9, 2021 23:11
July 9, 2021 18:53
July 9, 2021 23:11

Logo

运行环境

  • php >= 7.4
  • composer
  • hyperf >= 2.1

安装

composer require yansongda/hyperf-pay:~1.5.0

说明

发布配置文件

php bin/hyperf.php vendor:publish yansongda/hyperf-pay

使用

<?php

declare(strict_types=1);

namespace App\Controller;

use Yansongda\HyperfPay\Pay;
use Hyperf\HttpServer\Annotation\AutoController;

/**
 * @AutoController()
 */
class IndexController extends AbstractController
{
    public function index(Pay $pay)
    {
        return $pay->alipay()->web([
            'out_trade_no' => ''.time(),
            'total_amount' => '0.01',
            'subject' => 'yansongda 测试 - 1',
        ]);
    }
}

详细文档

https://pay.yansongda.cn

About

可能是基于 hyperf 的最优雅的支付宝、微信、银联支付 SDK 了

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages