mr-rijal/ccavenue 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

mr-rijal/ccavenue

最新稳定版本:1.1

Composer 安装命令:

composer require mr-rijal/ccavenue

包简介

Laravel package for CCAvenue payment gateway integration

README 文档

README

Laravel package for CCAvenue payment gateway integration. Supports Laravel 11, 12, and 13.

Requirements

  • PHP 8.1+
  • Laravel 11.x, 12.x, or 13.x

Installation

Install via Composer:

composer require mr-rijal/ccavenue

Publish the config and views:

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

Configuration

Add your CCAvenue credentials to .env:

CCAVENUE_MERCHANT_ID=your_merchant_id
CCAVENUE_ACCESS_CODE=your_access_code
CCAVENUE_WORKING_KEY=your_working_key
CCAVENUE_REDIRECT_URL=payment/success
CCAVENUE_CANCEL_URL=payment/cancel
CCAVENUE_CURRENCY=INR
CCAVENUE_LANGUAGE=EN
CCAVENUE_TEST_MODE=true

Config is merged under the ccavenue key (published to config/ccavenue.php). Set CCAVENUE_TEST_MODE=false for production.

For Laravel 5.x, add the response route to CSRF exceptions in app/Http/Middleware/VerifyCsrfToken.php (or use the published middleware). The config option remove_csrf_check is also available.

Usage

Resolve the payment gateway and create a purchase:

use MrRijal\CCAvenue\CCAvenue;

$ccavenue = app(CCAvenue::class);
$response = $ccavenue->purchase([
    'order_id' => 'ORD-' . uniqid(),
    'amount'   => 1000.00,
    // ... other CCAvenue parameters
]);

Handle the redirect response from CCAvenue in your callback controller and decode the response:

$ccavenue = app(CCAvenue::class);
$result = $ccavenue->response($request);

Or use the facade: CCAvenue::purchase([...]), CCAvenue::response($request).

Development

# Run tests
composer test

# Code style (PHPCS)
composer check-style
composer fix-style

# Laravel Pint
composer pint

License

This package is open-sourced software licensed under the MIT License.

Author

Prashant Rijal
https://prashantrijal.com.np

Support

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固