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

Overview

Logo

当前组件整体处于 beta 阶段

运行环境

  • php >= 7.3
  • composer
  • hyperf >= 2.1

安装

composer require yansongda/hyperf-pay:~1.0.0

说明

发布配置文件

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

使用



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

You might also like...
It's a PHP Application to simplify working with Google Sheets SDK for php.

About GoogleSheetsPHP It's a PHP Application to simplify working with Google Sheets SDK for php. Note: i used Slim 3 to construct the application but

Explicador e2Payments PHP SDK
Explicador e2Payments PHP SDK

This package seeks to help php developers implement the e2Payments APIs without much hustle. It is based on the REST API whose documentation

Official PHP SDK for interacting with the Knock API.

Knock PHP library Documentation See the documentation for PHP usage examples

Laravel wrapper for the Facebook Graph PHP 8 SDK

Laravel Facebook Graph SDK Installation Getting started with Laravel Facebook Graph is easy - first, install the package via composer composer require

OneSignal PHP SDK

OneSignal SDK for PHP developers with fluent API and supports Laravel / Lumen out of the box.

2c2p payment gateway Redirect PHP-SDK
2c2p payment gateway Redirect PHP-SDK

2c2p payment gateway Redirect PHP-SDK

Universal payments API SDK (UNOFFICIAL QIWI CLIENT)

Qiwi Php Client Especially for 🦊 Zorra Telecom and 👥 Everyone else Привет Attention: At the moment the number of methods is very limited, they will

🧬 Nano is a zero-config, no skeleton, minimal Hyperf distribution that allows you to quickly build a Hyperf application with just a single PHP file.

Nano is a zero-config, no skeleton, minimal Hyperf distribution that allows you to quickly build a Hyperf application with just a single PHP file.

微信支付 API v3 的 PHP Library,同时也支持 API v2

微信支付 WeChatPay OpenAPI SDK [A]Sync Chainable WeChatPay v2&v3's OpenAPI SDK for PHP 概览 微信支付 APIv2&APIv3 的Guzzle HttpClient封装组合, APIv2已内置请求数据签名及XML转换器,应

Shopware PHP SDK is a simple SDK implementation of Shopware 6 APIs
Shopware PHP SDK is a simple SDK implementation of Shopware 6 APIs

Shopware PHP SDK is a simple SDK implementation of Shopware 6 APIs. It helps to access the API in an object-oriented way.

Zoho CRM API SDK is a wrapper to Zoho CRM APIs. By using this sdk, user can build the application with ease

Archival Notice: This SDK is archived. You can continue to use it, but no new features or support requests will be accepted. For the new version, refe

CORS (Cross-Origin Resource Sharing) middleware for Hyperf application.

CORS Middleware for Hyperf Implements fruitcake/laravel-cors for Hyperf. Features Handles CORS pre-flight OPTIONS requests Adds CORS headers to your r

🚀 Developing Rocketseat's Next Level Week (NLW#05) Application using PHP/Swoole + Hyperf

Inmana PHP 🚀 Developing Rocketseat 's Next Level Week (NLW#05) Application using Swoole + Hyperf. This is the app of the Elixir track. I know PHP/Swo

Simple user settings facade for Hyperf. Settings are stored as JSON in a single database column, so you can easily add it to an existing table.

hyperf-user-settings Simple user settings util for hyperf Settings are stored as JSON in a single database column, so you can easily add it to an exis

Hyperf instant messaging program based on swoole framework
Hyperf instant messaging program based on swoole framework

Hyperf instant messaging program based on swoole framework

高性能的验证器组件(Validation),适用于 Hyperf 或 Laravel 框架,可获得数百倍的性能提升

验证器 简介 兼容 Hyperf/Laravel Validation 规则 部分场景可获得约 500 倍性能提升 验证器可多次复用不同数据,无状态设计 规则可全局复用 智能合并验证规则 安装 环境要求 PHP = 8.0 mbstring 扩展 ctype 扩展 安装命令 composer re

fast Framework of Hyperf(一把梭快速骨架 CRUD快速开发)

fast-framework Hyperf 的一把梭骨架 composer require yogcloud/framework 功能 提供从 Controller Request Model Service Interface 一整套生成命令 $ php bin/hyperf gen g

An issue tracking tool based on hyperf+reactjs for small and medium-sized enterprises, open-source and free, similar to Jira.
An issue tracking tool based on hyperf+reactjs for small and medium-sized enterprises, open-source and free, similar to Jira.

介绍 本项目以 actionview 为蓝本,使用 Hyperf 框架进行重写。 本项目为 Hyperf 框架的 DEMO 项目 原 ActionView 介绍 English | 中文 一个类Jira的问题需求跟踪工具,前端基于reactjs+redux、后端基于php laravel-frame

🚀Hyperf is an extremely performant and flexible PHP CLI framework
🚀Hyperf is an extremely performant and flexible PHP CLI framework

Hyperf is an extremely performant and flexible PHP CLI framework, powered by a state-of-the-art coroutine server and a large number of battle-tested components. Aside from decisively beating PHP-FPM frameworks in benchmarks, Hyperf is unique in its focus on flexibility and composition.

Comments
  • 公众号支付,预下单,log出现预下单失败:响应缺少 prepay_id 参数

    公众号支付,预下单,log出现预下单失败:响应缺少 prepay_id 参数

    按提示与微信官方提示报错,在使用_force强制替换了config配置,如下 weixin => [default=>[ 'mp_app_id' => 'xxx', 'mch_secret_key' => 'xxx', 'mch_secret_cert' => '/Users/lianka/Project/payCenter/app/Core/Cert/apiclient_key.pem', 'mch_public_cert_path' => '/Users/lianka/Project/payCenter/app/Core/Cert/apiclient_cert.pem', 'mch_id' => 'xx', 'sub_mch_id' => 'xx', 'notify_url' => 'https://yansongda.cn/wechat/notify',

    ]]

    增加参数sub_mch_id后,此报错依旧。想知道是传参方式有问题还是sub_mch_id字段名问题

    opened by qchat-cloud 10
  • [ERROR] Object of class Yansongda\Pay\Rocket could not be converted to string[136]

    [ERROR] Object of class Yansongda\Pay\Rocket could not be converted to string[136]

    hyperf版本:2.2 hyperf-pay版本: v1.0.0-beta.0

    [INFO] [AbstractProvider] 即将进行 pay 操作
    [ERROR] Object of class Yansongda\Pay\Rocket could not be converted to string[136] in /mnt/e/workspace/test/vendor/hyperf/framework/src/Logger/StdoutLogger.php
    [ERROR] #0 /mnt/e/workspace/test/vendor/hyperf/framework/src/Logger/StdoutLogger.php(136): str_replace()
    
    opened by micross 8
  • hyperf里面调用什么都不提示都报错这个咋回事

    hyperf里面调用什么都不提示都报错这个咋回事

    [ERROR] Yansongda\Pay\Exception\InvalidResponseException: (5003) in /www/wwwroot/wash/apiadminHf/vendor/yansongda/pay/src/Functions.php:204 Stack trace: #0 /www/wwwroot/wash/apiadminHf/vendor/yansongda/pay/src/Plugin/Wechat/LaunchPlugin.php(32): verify_wechat_sign() #1 /www/wwwroot/wash/apiadminHf/vendor/yansongda/supports/src/Pipeline.php(126): Yansongda\Pay\Plugin\Wechat\LaunchPlugin->assembly() #2 /www/wwwroot/.com/wash/apiadminHf/vendor/yansongda/pay/src/Plugin/Wechat/SignPlugin.php(49): Yansongda\Supports\Pipeline->Yansongda\Supports{closure}() #3 /www/wwwroot/.com/wash/apiadminHf/vendor/yansongda/supports/src/Pipeline.php(126): Yansongda\Pay\Plugin\Wechat\SignPlugin->assembly()

    opened by fengyikang88 2
  • https://pay.yansongda.cn/docs/v3/wechat/callback.html#%E5%8F%82%E6%95%B0

    https://pay.yansongda.cn/docs/v3/wechat/callback.html#%E5%8F%82%E6%95%B0

    https://pay.yansongda.cn/docs/v3/wechat/callback.html#%E5%8F%82%E6%95%B0

    最初由 yansongda 在 https://github.com/yansongda/hyperf-pay/issues/8#issuecomment-966932813 发布

    opened by ZZZach353 0
Owner
yansongda
Coding My Life
yansongda
Mailgun's Official SDK for PHP

Mailgun PHP client This is the Mailgun PHP SDK. This SDK contains methods for easily interacting with the Mailgun API. Below are examples to get you s

Mailgun Team 1k Dec 23, 2022
A Laravel package to help integrate Shopware PHP SDK much more easier

Shopware 6 Laravel SDK A Laravel package to help integrate Shopware PHP SDK much more easier Installation Install with Composer composer require sas/s

Shape & Shift 16 Nov 3, 2022
Minter Blockchain PHP SDK

About This is a pure PHP SDK for working with Minter blockchain Installation Minter Api Methods: getBalance getNonce send getAddresses getStatus getVa

Minter 24 Nov 21, 2022
The official PHP SDK for Webmarketer (app.webmarketer.io)

PHP SDK for Webmarketer The official PHP SDK for Webmarketer (app.webmarketer.io). Install To add this package, your project must meet several require

Webmarketer 5 Dec 13, 2021
SDK for latest version of Telegram bots API

SDK for latest version of Telegram bots API (from April 24, 2020) Using Examples Installing composer require "DiyorbekUz/Telelib: dev-master" Init bot

Diyorbek 2 Sep 5, 2021
A PHP SDK for the GlobalSmartOTP API.

GlobalSmartOTP PHP SDK A PHP SDK for the GlobalSmartOTP API. Requirements PHP 7.4 or higher cURL Installation $ git clone [email protected]:GlobalSmartOT

GlobalSmartOTP 4 Oct 2, 2022
Fatture in Cloud SDK (Software Development Kit) for PHP

FattureInCloud PHP SDK Request informations In every request description you will be able to find some additional informations about context, permissi

Fatture in Cloud 25 Dec 5, 2022
🤖 Telegram Bot API PHP SDK. Lets you build Telegram Bots easily! Supports Laravel out of the box.

Telegram Bot API - PHP SDK Telegram Bot PHP SDK lets you develop Telegram Bots in PHP easily! Supports Laravel out of the box. Telegram Bot API is an

Irfaq Syed 2.5k Jan 6, 2023
API SDK for OpenTrade Commerce API: Taobao, Alibaba, JD, 1688, Aliexpress, Ebay.

OtapiPhpClient Create Client $client = new OtClient($key, $secret, $lang); key (Access Key) secret (Secret for access key) language (2 symbol lang id

OpenTrade Commerce 5 Sep 20, 2022
Laravel SDK for Sentry

Sentry for Laravel Laravel integration for Sentry. Laravel Version Compatibility Laravel <= 4.2.x is supported until 0.8.x Laravel <= 5.7.x on PHP <=

Sentry 1.1k Dec 30, 2022