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

Laravel MPP: Charge AI Agents for API Access with 402 Payment Required image

Laravel MPP: Charge AI Agents for API Access with 402 Payment Required

Read article
 Laravel AI Tasks: An AI Orchestration Package for Queues, Logging, and Cost Control image

Laravel AI Tasks: An AI Orchestration Package for Queues, Logging, and Cost Control

Read article
Yammi Audit Log: Track Who Really Made a Change Across Jobs and Queues image

Yammi Audit Log: Track Who Really Made a Change Across Jobs and Queues

Read article
NationForge: A Self-Hosted Admin Panel for Civic Organizations image

NationForge: A Self-Hosted Admin Panel for Civic Organizations

Read article
Lattice: Describe Inertia UIs in PHP image

Lattice: Describe Inertia UIs in PHP

Read article
Subscriptionify: Feature-Based Subscription Management for Laravel image

Subscriptionify: Feature-Based Subscription Management for Laravel

Read article
Blastup logo

Blastup

Blastup provides social media enhancement services including buying Instagram likes, followers, and views, with features like instant delivery and a variety of packages to suit different needs.

Blastup
Tinkerwell logo

Tinkerwell

The must-have code runner for Laravel developers. Tinker with AI, autocompletion and instant feedback on local and production environments.

Tinkerwell
Shift logo

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift
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
Typesense Search logo

Typesense Search

Typesense is an open source, blazing-fast search engine, optimized for helping you build delightful search experiences for your sites and apps. Natively integrated with Laravel Scout.

Typesense Search
Laravel Cloud logo

Laravel Cloud

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

Laravel Cloud