Package

Yansongda Laravel Pay

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

Package

yansongda/laravel-pay

View on GitHub →

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 Laravel Pay Related Articles

Manage Virtual Wallets in Laravel with Pay Pocket image

Manage Virtual Wallets in Laravel with Pay Pocket

Read article
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
Vue.js Tutorial: From jQuery to Vue.js image

Vue.js Tutorial: From jQuery to Vue.js

Read article
Automatically Making Monthly Payments with Dusk image

Automatically Making Monthly Payments with Dusk

Read article
Get Tickets for Tomorrow’s Laracon Online 2019 image

Get Tickets for Tomorrow’s Laracon Online 2019

Read article
A simple form builder that stays out of your way image

A simple form builder that stays out of your way

Read article

Acquaint Softtech

Acquaint Softtech offers AI-ready Laravel developers who onboard in 48 hours at $3000/Month with no lengthy sales process and a 100 percent money-back guarantee.

Acquaint Softtech

Let your users buy domains without leaving your app

If your Laravel app gives users a site, a storefront, or a workspace, they’ll eventually want their own domain. The name.com API lets them search, register, and connect one without leaving your product. It’s a clean REST API, so Laravel’s HTTP client is all you need.

Let your users buy domains without leaving your app

PhpStorm

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

PhpStorm

Shift

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

Shift

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum

Harpoon: Next generation time tracking and invoicing

The next generation time-tracking and billing software that helps your agency plan and forecast a profitable future.

Harpoon: Next generation time tracking and invoicing