mpyazilim/mppos
Composer 安装命令:
composer require mpyazilim/mppos
包简介
Unified Turkish Bank POS Gateway (Kuveyt Turk, Vakif Katilim, etc.)
README 文档
README
MPYazilim multi-bank POS kutuphanesi.
Bankalarin payment, cancel, refund ve partialRefund islemlerini tek API altinda toplar.
| Banka | Durum |
|---|---|
| KuveytTurk V2 | Active: Payment, Cancel, Refund, PartialRefund |
| Vakif Katilim | Active: Payment, Cancel, Refund, PartialRefund |
| ParamPOS | Active: Payment, Cancel, Refund, PartialRefund |
Gereksinimler
- PHP
8.1+
Kurulum
composer require mpyazilim/mppos
Temel Kullanim
use MPPos\MPPos;
KuveytTurk
Payment
KuveytTurk tarafinda odeme 2 adimlidir:
payment()ile 3D HTML alinur- callback sonrasinda
completePayment()ile provizyon alinur
$pos = MPPos::kuveytturk() ->account([ 'merchant_id' => '...', 'customer_id' => '...', 'username' => '...', 'password' => '...', ]) ->payload([ 'merchantOrderId' => 'ORD-1001', 'amount' => 149.90, 'card_holder' => 'TEST USER', 'card_number' => '5188961939192544', 'exp_month' => '06', 'exp_year' => '25', 'cvv' => '929', 'ok_url' => 'https://site.com/kuveyt-ok', 'fail_url' => 'https://site.com/kuveyt-fail', 'client_ip' => '1.2.3.4', 'phone' => '5555555555', 'email' => 'user@example.com', ]) ->test(true); $init = $pos->payment(); if ($init['ok']) { echo $init['html']; }
Payment Callback ve Provizyon
$pos = MPPos::kuveytturk() ->account([ 'merchant_id' => '...', 'customer_id' => '...', 'username' => '...', 'password' => '...', ]) ->payload([ 'AuthenticationResponse' => $_POST['AuthenticationResponse'] ?? '', ]) ->test(true); $auth = $pos->parsePaymentResponse(); if ($auth['ok']) { $pos->completePayment(); $response = $pos->getResponse(); }
Cancel
$pos = MPPos::kuveytturk() ->account([ 'merchant_id' => '...', 'customer_id' => '...', 'username' => '...', 'password' => '...', ]) ->payload([ 'remote_order_id' => '319800289', 'merchantOrderId' => 'ORD-1001', 'ref_ret_num' => '035617458943', 'auth_code' => '412371', 'transaction_id' => '458943', ]); $pos->cancel(); $response = $pos->getResponse();
Refund
$pos = MPPos::kuveytturk() ->account([ 'merchant_id' => '...', 'customer_id' => '...', 'username' => '...', 'password' => '...', ]) ->payload([ 'remote_order_id' => '319800289', 'merchantOrderId' => 'ORD-1001', 'ref_ret_num' => '035617458943', 'auth_code' => '412371', 'transaction_id' => '458943', 'amount' => 149.90, ]); $pos->refund(); $response = $pos->getResponse();
PartialRefund
$pos = MPPos::kuveytturk() ->account([ 'merchant_id' => '...', 'customer_id' => '...', 'username' => '...', 'password' => '...', ]) ->payload([ 'remote_order_id' => '319800289', 'merchantOrderId' => 'ORD-1001', 'ref_ret_num' => '035617458943', 'auth_code' => '412371', 'transaction_id' => '458943', 'amount' => 50.00, ]); $pos->partialRefund(); $response = $pos->getResponse();
Vakif Katilim
Payment
Vakif Katilim tarafinda da 3D odeme 2 adimlidir:
payment()ile bankanin 3D HTML formu alinur- callback sonrasinda
completePayment()ile provizyon alinur
$pos = MPPos::vakifkatilim() ->account([ 'merchant_id' => '...', 'customer_id' => '...', 'username' => '...', 'password' => '...', ]) ->payload([ 'merchantOrderId' => 'ORD-2001', 'amount' => 149.90, 'card_holder' => 'TEST USER', 'card_number' => '5353550000958906', 'exp_month' => '01', 'exp_year' => '26', 'cvv' => '741', 'ok_url' => 'https://site.com/vakif-ok', 'fail_url' => 'https://site.com/vakif-fail', 'client_ip' => '1.2.3.4', 'address' => [ 'Type' => '1', 'Name' => 'Test User', 'PhoneNumber' => '5555555555', 'AddressId' => '1', 'Email' => 'user@example.com', ], ]) ->test(true); $init = $pos->payment(); if ($init['ok']) { echo $init['html']; }
Payment Callback ve Provizyon
Vakif Katilim callback tarafinda genelde ResponseMessage icinde url-encoded XML doner.
$pos = MPPos::vakifkatilim() ->account([ 'merchant_id' => '...', 'customer_id' => '...', 'username' => '...', 'password' => '...', ]) ->payload([ 'ResponseMessage' => $_POST['ResponseMessage'] ?? '', 'ResponseCode' => $_POST['ResponseCode'] ?? '', 'MerchantOrderId' => $_POST['MerchantOrderId'] ?? '', 'OrderId' => $_POST['OrderId'] ?? '', 'MD' => $_POST['MD'] ?? '', 'HashData' => $_POST['HashData'] ?? '', ]) ->test(true); $auth = $pos->parsePaymentResponse(); if ($auth['ok']) { $pos->completePayment(); $response = $pos->getResponse(); }
Cancel
$pos = MPPos::vakifkatilim() ->account([ 'merchant_id' => '...', 'customer_id' => '...', 'username' => '...', 'password' => '...', ]) ->payload([ 'merchantOrderId' => 'ORD-2001', 'remote_order_id' => '15161', 'amount' => 149.90, ]); $pos->cancel(); $response = $pos->getResponse();
Refund
$pos = MPPos::vakifkatilim() ->account([ 'merchant_id' => '...', 'customer_id' => '...', 'username' => '...', 'password' => '...', ]) ->payload([ 'merchantOrderId' => 'ORD-2001', 'remote_order_id' => '15161', ]); $pos->refund(); $response = $pos->getResponse();
PartialRefund
$pos = MPPos::vakifkatilim() ->account([ 'merchant_id' => '...', 'customer_id' => '...', 'username' => '...', 'password' => '...', ]) ->payload([ 'merchantOrderId' => 'ORD-2001', 'remote_order_id' => '15161', 'amount' => 50.00, ]); $pos->partialRefund(); $response = $pos->getResponse();
Not: Vakif Katilim test URL'leri dokumanda acik verilmedigi icin gerekirse account() icine
payment_url, provision_url, cancel_url, refund_url, partial_refund_url override alanlari verilebilir.
ParamPOS
Payment
$pos = MPPos::parampos() ->account([ 'client_code' => '...', 'username' => '...', 'password' => '...', 'guid' => '...', ]) ->payload([ 'order_id' => 'ORD-3001', 'amount' => 14990, 'card_holder' => 'TEST USER', 'card_number' => '4546711234567894', 'exp_month' => '12', 'exp_year' => '26', 'cvv' => '000', 'success_url' => 'https://site.com/param-ok', 'fail_url' => 'https://site.com/param-fail', 'phone' => '5555555555', 'ip' => '1.2.3.4', ]); $response = $pos->payment();
Payment Complete3D
$response = MPPos::parampos() ->account([ 'client_code' => '...', 'username' => '...', 'password' => '...', 'guid' => '...', ]) ->complete3D( ucdMd: $_POST['md'] ?? '', islemGuid: $_POST['islemGUID'] ?? '', orderId: $_POST['orderId'] ?? '' );
Cancel
$pos = MPPos::parampos() ->account([ 'client_code' => '...', 'username' => '...', 'password' => '...', 'guid' => '...', ]) ->payload([ 'order_id' => 'ORD-3001', 'amount' => 14990, ]); $pos->cancel(); $response = $pos->getResponse();
Refund
$pos = MPPos::parampos() ->account([ 'client_code' => '...', 'username' => '...', 'password' => '...', 'guid' => '...', ]) ->payload([ 'order_id' => 'ORD-3001', 'amount' => 14990, ]); $pos->refund(); $response = $pos->getResponse();
PartialRefund
$pos = MPPos::parampos() ->account([ 'client_code' => '...', 'username' => '...', 'password' => '...', 'guid' => '...', ]) ->payload([ 'order_id' => 'ORD-3001', 'amount' => 5000, ]); $pos->partialRefund(); $response = $pos->getResponse();
Response
Tum banka islemlerinden sonra sonuc verisi getResponse() ile alinabilir.
Array ( [ok] => true [code] => 00 [message] => PROVIZYON ALINDI [http_code] => 200 [type] => Sale [provider] => vakifkatilim )
mpyazilim/mppos 适用场景与选型建议
mpyazilim/mppos 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 28 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 02 月 07 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 mpyazilim/mppos 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mpyazilim/mppos 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 28
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 24
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-02-07