Laravel Pay

yansongda/laravel-pay image

Laravel Pay stats

Downloads
244.4K
Stars
1,024
Open Issues
8
Forks
182

View on GitHub →

专注 Alipay/WeChat/Unipay 的 laravel 支付扩展包

Pay

依赖

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

安装

composer require yansongda/laravel-pay:~3.5.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

yansongda photo

Coding My Life...

Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.


Yansongda Laravel Pay Related Articles

Building and Deploying a Laravel App With Claude Code on Zerops image

Building and Deploying a Laravel App With Claude Code on Zerops

Read article
The Analytics Stack for Laravel: Traffic, Revenue and Attribution in One Place image

The Analytics Stack for Laravel: Traffic, Revenue and Attribution in One Place

Read article
How to Use the HTTP QUERY Method in Laravel with Scout Search image

How to Use the HTTP QUERY Method in Laravel with Scout Search

Read article
Enforce Per-Action Waiting Periods in Laravel with Cooldown image

Enforce Per-Action Waiting Periods in Laravel with Cooldown

Read article
Laravel Legacy Bridge: Carry Authenticated Sessions from a Legacy App into Laravel image

Laravel Legacy Bridge: Carry Authenticated Sessions from a Legacy App into Laravel

Read article
Find the Security Vulnerabilities in Your Laravel App with Sensagraph image

Find the Security Vulnerabilities in Your Laravel App with Sensagraph

Read article
Tighten logo

Tighten

We help companies turn great ideas into amazing apps, products, and services.

Tighten
Securing Laravel logo

Securing Laravel

The essential security resource for Laravel devs, covering everything you need to keep your apps secure. Sign up to receive weekly security tips and monthly in depth articles, diving deep into security concepts you need to know!

Securing Laravel
The Certification of Competence for Laravel logo

The Certification of Competence for Laravel

A community-driven, proctored assessment across 4 levels designed to validate real-world Laravel knowledge, from Junior to mastery-level Artisan. Official Vue.js, Official Nuxt, Angular, React, JS certifications also available.

The Certification of Competence for Laravel
Laravel Cloud logo

Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Laravel Cloud
LoadForge logo

LoadForge

Scalable load testing for web apps & APIs. Simulate real-world traffic and identify breaking points and performance limits with powerful, scalable load tests designed for Laravel.

LoadForge
PhpStorm logo

PhpStorm

The go-to PHP IDE with extensive out-of-the-box support for Laravel and its ecosystem.

PhpStorm