samueltarus/laravel-pesapal 问题修复 & 功能扩展

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

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

samueltarus/laravel-pesapal

Composer 安装命令:

composer require samueltarus/laravel-pesapal

包简介

A Laravel package for PesaPal integration

README 文档

README

This package provides an easy way to integrate PesaPal payment gateway into your Laravel application.

Installation

You can install the package via composer:

composer require samueltarus/laravel-pesapal

Configuration

Publish the config file with:

php artisan vendor:publish --provider="samueltarus\LaravelPesaPal\PesaPalServiceProvider" --tag="config"

Then, add your PesaPal credentials to your .env file:

PESAPAL_CONSUMER_KEY=your_consumer_key_here
PESAPAL_CONSUMER_SECRET=your_consumer_secret_here
PESAPAL_ENDPOINT=https://endpoints.mikaappliances.com

Usage

This package provides two main routes:

  1. Process Payment: POST /pesapal/process-payment
  2. Check Status: GET /pesapal/check-status

You can also use the PesaPal facade in your code:

use samueltarus\LaravelPesaPal\Facades\PesaPal;

// Process a payment
$result = PesaPal::submitOrder([
    'amount' => 1000,
    'currency' => 'USD',
    'description' => 'Test payment',
    'callback_url' => 'https://your-callback-url.com',
]);

// Check status of a transaction
$status = PesaPal::getTransactionStatus('order_tracking_id');

License

The MIT License (MIT). Please see License File for more information.# laravel-pesapal

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-09-21