• Stars
    star
    1,040
  • Rank 44,297 (Top 0.9 %)
  • Language
    PHP
  • License
    MIT License
  • Created about 7 years ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

可能是我用过的最优雅的 Alipay/WeChat/Unipay 的 laravel 支付扩展包了

Pay

依赖

  • php >= 7.3
  • composer
  • laravel || lumen >= 8.0

安装

composer require yansongda/laravel-pay:~3.4.0

laravel 用户

配置文件

php artisan vendor:publish --provider="Yansongda\LaravelPay\PayServiceProvider" --tag=laravel-pay

lumen 用户

配置文件

请手动复制配置文件

service provider

$app->register(Yansongda\LaravelPay\PayServiceProvider::class);

使用方法

支付宝

use Pay;

$order = [
    'out_trade_no' => time(),
    'total_amount' => '1',
    'subject' => 'test subject - 测试',
];

return Pay::alipay()->web($order);

// 下面这个方法也可以
// return Pay::web($order);

微信

use Pay;

$order = [
    'out_trade_no' => time(),
    'body' => 'subject-测试',
    'total_fee'      => '1',
    'openid' => 'onkVf1FjWS5SBIixxxxxxxxx',
];

$result = Pay::wechat()->mp($order);

具体使用说明请传送至 https://github.com/yansongda/pay

License

MIT

More Repositories

1

pay

可能是我用过的最优雅的 Alipay/WeChat/Unipay 的支付 SDK 扩展包了
PHP
4,888
star
2

laravel-notification-wechat

Wechat Template Message Notifications Channel for Laravel >= 5.3
PHP
83
star
3

hyperf-pay

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

laravel-api

基于 access_token 的多用户多应用 API 认证开发包
PHP
50
star
5

docker-compose-LNMP

docker-compose with latest php-fpm,nginx,redis,memcached,mariadb
PHP
36
star
6

supports

handle with array/log/config/guzzle etc.
PHP
20
star
7

docker-php

PHP in docker
Dockerfile
10
star
8

git-notify

git 代码推送通知服务
PHP
10
star
9

python-aliyun-iot-device

非官方,阿里云 IOT 套件设备端 Python 开发 SDK
Python
9
star
10

laravel-parsedown

Convert Markdown To Html With Laravel
PHP
8
star
11

laravel-parsehtml

Convert Html To Markdown With Laravel
PHP
4
star
12

docker-compose-LNMongoP

docker compose with latest php-fpm,nginx,redis,memcached,mongodb
PHP
3
star
13

yansongda.github.io

HTML
2
star
14

pay-site

JavaScript
2
star
15

artful

Api RequesT Framework U Like - 你喜欢的 API 请求框架
PHP
2
star
16

docker-elasticsearch

docker elasticsearch
Dockerfile
1
star
17

rate-limit-bundle

rate limiter for symfony 4
PHP
1
star
18

docker-php-fpm-nginx

docker php-fpm + Nginx image, and can use in production
Dockerfile
1
star
19

translate

translate SDK
PHP
1
star
20

docker-tools

common tools. Git node yarn...
Dockerfile
1
star
21

hyperf-skeleton

hyperf skeleton for me
PHP
1
star
22

rust-utils

rust 中一些关于我自己的常用工具
Rust
1
star
23

docker-nginx

docker with nginx
Dockerfile
1
star
24

rust-tools

Rust
1
star