parsepesa/php 问题修复 & 功能扩展

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

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

parsepesa/php

Composer 安装命令:

composer require parsepesa/php

包简介

Official PHP SDK for ParsePesa - The Stripe for M-Pesa SMS.

README 文档

README

The official PHP SDK for ParsePesa - The Stripe for M-Pesa SMS. Convert raw M-Pesa messages into structured JSON in milliseconds.

Installation

Install the package via Composer:

composer require parsepesa/php

Quick Start

use ParsePesa\ParsePesa;

$sdk = new ParsePesa('your_api_key');

// Parse a single message
$result = $sdk->parse("Confirmed. You have received KES 500.00 from JOHN DOE...");

echo $result['amount']; // 500
echo $result['counterparty']; // JOHN DOE

Features

1. Single Parsing

$result = $sdk->parse($message);

2. Batch Parsing

$results = $sdk->batchParse([$msg1, $msg2]);

3. Account Balance

$balance = $sdk->getBalance();
echo "KES " . $balance;

4. Handling Webhooks

Use this in your callback URL endpoint:

$data = $sdk->handleWebhook();
// Process $data['type'], $data['amount'], etc.

Requirements

  • PHP 7.4 or higher
  • guzzlehttp/guzzle 7.0+

License

MIT

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固