kamalsroor/moyasarapi
Composer 安装命令:
composer require kamalsroor/moyasarapi
包简介
Moyasar Api Package With Laravel 8.0 above ^ created by kamalsroor :)
README 文档
README
Moyasar Api Package With Laravel > 8 and above ^ created by Kamal Sroor :)
Installation
run this commad on your composer
composer require kamalsroor/moyasarapi:dev-master
#attention please this package based on guzzlehttp version 6.2 don't worry this package auto downloaded by Composer
#app.php preparing
you maybe want add this on providers array to config/app.php
kamalsroor\MoyasarApi\MoyasarProvider::class,
add this on aliases array
'Moyasar' => kamalsroor\MoyasarApi\MoyasarFaced::class,
after save app.php
run this command in your composer to make moyasar.php and move to config folder automatically
php artisan vendor:publish
and you must be signup account with https://moyasar.com and generate new keys like this https://moyasar.com/docs/api/?php#authentication you should update your config
return [ 'Test_Secret_Key'=>'Add Your Secret Key Here :)', 'Test_Publishable_Key'=>'Add Your Test Publishable Key Here', 'Live_Secret_Key'=>'Add Your Live Secret Key Here', 'Live_Publishable_Key'=>'Add Your Live Publishable Key Here ', ];
#usage use this class to set api key with this method
Moyasar::setApiKey(config('moyasar.Test_Secret_Key'));
if you want make a new invoices use this method
Moyasar::InvCreate('10000','pay me');
to query about invoice use this method
Moyasar::InvFetch("your id invoice "); // this method get array like this if success paid https://moyasar.com/docs/api/?php#payments // https://moyasar.com/docs/api/?php#invoices // if can be the payments array not empty and source .. check message key is successed to check invoice paid or not
to create new payment jus use this method on your site to input type credit card or visa like this
// const class type /* Moyasar::CREDIT_CARD Moyasar::CURRENCY Moyasar::DESCRIPTION Moyasar::SOURCE Moyasar::SADAD Moyasar::AMOUNT */ $card = [ "type" => Moyasar::CREDIT_CARD, "name" => "Abdulaziz Nasser", "number" => "4111111111111111", "cvc" => 331, "month" => 12, "year" => 2017 ]; // price cardinfo description currency return Moyasar::PayCreate("10000" ,$card, "bag payment", "SAR"); // check status array to successed
to get all invoices use this method
// get all invoices paid return Moyasar::PayAll();
#default methods By Moyasar Api
// Client Class By Moyasar kamalsroor\MoyasarApi\MoyasarFaced\Moyasar\Client // Invoice Class By Moyasar kamalsroor\MoyasarApi\MoyasarFaced\Moyasar\Invoice // Payment Class By Moyasar kamalsroor\MoyasarApi\MoyasarFaced\Moyasar\Payment // HttpRequestNotFound Class By Moyasar kamalsroor\MoyasarApi\MoyasarFaced\Moyasar\HttpRequestNotFound // ============ OR You Can Add In aliases Array =============== // 'Client' =>kamalsroor\MoyasarApi\MoyasarFaced\Moyasar\Client::class, 'Invoice' =>kamalsroor\MoyasarApi\MoyasarFaced\Moyasar\Invoice::class, 'Payment' =>kamalsroor\MoyasarApi\MoyasarFaced\Moyasar\Payment::class, 'HttpRequestNotFound'=>kamalsroor\MoyasarApi\MoyasarFaced\Moyasar\HttpRequestNotFound::class,
kamalsroor/moyasarapi 适用场景与选型建议
kamalsroor/moyasarapi 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 118 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 05 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「api」 「payment」 「laravel」 「Banking」 「integration」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 kamalsroor/moyasarapi 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 kamalsroor/moyasarapi 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 kamalsroor/moyasarapi 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A PSR-7 compatible library for making CRUD API endpoints
Alfabank REST API integration
Zero-dependency raw PHP DNS resolver, domain-ownership verification, and intoDNS/MxToolbox-style diagnostics. Queries authoritative nameservers directly over sockets — never trusts the recursive cache for ownership checks.
A lightweight plain-PHP framework for database-backed CRUD APIs.
bughq error tracking - PHP SDK
TrinkPOS Sanal POS (Virtual POS) API client for PHP
统计信息
- 总下载量: 118
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 17
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-05-05