定制 leadingedge/payhere-laravel 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

leadingedge/payhere-laravel

Composer 安装命令:

composer require leadingedge/payhere-laravel

包简介

Laravel package for PayHere payment gateway - Sri Lanka

README 文档

README

A clean, simple Laravel package for integrating PayHere payment gateway — built for Sri Lankan developers.

Installation

composer require leadingedge/payhere-laravel

Configuration

Publish the config file:

php artisan vendor:publish --tag=payhere-config

Add to your .env file:

PAYHERE_MERCHANT_ID=your_merchant_id PAYHERE_MERCHANT_SECRET=your_merchant_secret PAYHERE_SANDBOX=true PAYHERE_CURRENCY=LKR

Usage

Generate Checkout Form

use LeadingEdge\PayHere\Facades\PayHere;

$checkoutData = PayHere::buildCheckout([ 'order_id' => 'ORDER-001', 'items' => 'Premium Plan', 'amount' => 2500.00, 'first_name' => 'Kamal', 'last_name' => 'Perera', 'email' => 'kamal@email.com', 'phone' => '0771234567', 'return_url' => route('payment.success'), 'cancel_url' => route('payment.cancel'), 'notify_url' => route('payment.notify'), ]);

Verify Webhook Notification

if (PayHere::verifyNotification($request->all())) { // Payment confirmed ✅ }

Requirements

  • PHP 8.0+
  • Laravel 9, 10, or 11

License

MIT — Free to use

Author

TrishanLeading Edge Solutions 🇱🇰

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 11
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-05-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固