applab/sadad
Composer 安装命令:
composer require applab/sadad
包简介
Applab Sadad
README 文档
README
Sadad Payment Paltform
Sadad is a Qatari Platform to send/receive payment via online [store / Website / portal ] and mobile [applications]
Below are a full list of features:
- Web Checkout
- API Integration
- Transactions - List Transactions
- Transaction - Get Single Transaction
- Transaction - Refund Transaction
About Applab
AppLab is a leading company specialized in online platforms development. Online Platforms include Back-end, Databases, Web Applications and Mobile
About Sadad Platform
Sadad Sadad is a Qatari Platform to send/receive payment via online.
Installing Applab Sadad
The recommended way to install Applab Sadad is through Composer.
composer require applab/sadad
Publish configuration and migrations
php artisan vendor:publish --provider="Applab\Sadad\SadadServiceProvider"
The service provider is loaded automatically using package discovery.
Usage
Configuration
The package ships with a configuration file called applab-sadad.php which is published to the config directory during installation. Below is an outline of the settings.
sadadId
Issued when creating your sadad account
secretKey
Issued when register your domain
domain
Your registered domain name
WebCheckout 2.1
Customer is on your website’s checkout page and fills up the details and places order.
$webCheckoutOneReq = new WCORequest(); $webCheckoutOneReq->total_amount=100; $webCheckoutOneReq->order_id = $webCheckoutReq->getOrderId(); $webCheckoutOneReq->customer_mobile = "974XXXXXXXX"; $webCheckoutOneReq->callback_url = url('sadad-purchased/'.$webCheckoutReq->order_id); $products[] = [ 'id' => 123, 'title' => "product name", 'quantity' => 1, 'amount' => 1, 'type' => 'line_item' ]; $webCheckoutOneReq->setProducts($products); return Sadad::webCheckoutOne($webCheckoutOneReq); //default view
exclude your callback url in verify CSRF Token middleware to get the post response from SADAD
Merchant Integration APIs
Transactions List
$filters = []; Sadad::getTransactions($filter)
Transaction details
Sadad::getTransaction('SD33XXXXXXXXXX8')
Transaction refund
Sadad::refundTransaction('SD33XXXXXXXXXX8')
Invoices List
$filters = []; Sadad::getInvoices($filter)
Create Invoice
$invoiceData = new InvoiceRequest(); $invoiceData->countryCode = '974'; $invoiceData->cellnumber = '66XXXXXX'; $invoiceData->clientname = 'Client name'; // Status for Invoice // 1 - Draft, 2 - Unpaid, 3 - Paid, 4 - Overdue, 5 - Cancelled $invoiceData->status = 2; $invoiceData->remarks = 'Invoice test remarks'; $invoiceData->amount = 100; // Total amount in QR // Invoice can have many item $invoice_details[] = [ 'description' => 'Testing 123', 'quantity' => 1, 'amount' => 100, // Amount for each item ]; $invoiceData->setInvoiceDetails($invoice_details); $payload = $invoiceData->preparePayload()->getPayload(); return Sadad::createInvoice($payload);
Share Invoice
// Share using mobile $payload = [ 'sentvia' => 4, 'invoicenumber' => 'SD66XXXXXXXXX8', 'receivercellno' => '66XXXXXX', ]; // Share using email $payload = [ 'sentvia' => 3, 'invoicenumber' => 'SD66XXXXXXXXX8', 'receiverEmail' => 'mail@example.com', ]; return Sadad::shareInvoice($payload);
Security Vulnerabilities
If you discover a security vulnerability within this package, please send an e-mail to Manu Applab via manu@applab.qa. All security vulnerabilities will be promptly addressed.
License
This package is open-sourced software licensed under the MIT license.
applab/sadad 适用场景与选型建议
applab/sadad 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.24k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2021 年 10 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「payment」 「laravel」 「sadad」 「Qatar」 「applab」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 applab/sadad 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 applab/sadad 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 applab/sadad 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A Laravel package for connecting to all Iraninan payment gateways
Alfabank REST API integration
Connect to Iran payment gateways through PHP(laravel).
A Laravel package for connecting to all Iraninan payment gateways
A Laravel package for connecting to all Iraninan payment gateways
a Laravel package to handle Internet Payment Gateways for Iran Banking System
统计信息
- 总下载量: 2.24k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 14
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-10-05