mintance/ipsp-php
Composer 安装命令:
composer require mintance/ipsp-php
包简介
Payment Service Provider PHP SDK
README 文档
README
Payment service provider
A payment service provider (PSP) offers shops online services for accepting electronic payments by a variety of payment methods including credit card, bank-based payments such as direct debit, bank transfer, and real-time bank transfer based on online banking. Typically, they use a software as a service model and form a single payment gateway for their clients (merchants) to multiple payment methods. read more
Installation with Composer
composer require mintance/ipsp-php
Quick Start
<?php define('MERCHANT_ID' , 'your_merchant_id'); define('MERCHANT_PASSWORD' , 'test'); define('IPSP_GATEWAY' , 'your_ipsp_gateway'); $client = new Ipsp\Client( MERCHANT_ID , MERCHANT_PASSWORD, IPSP_GATEWAY ); $ipsp = new Ipsp\Api( $client );
Generate Signature
<?php function getSignature( $merchant_id , $password , $params = array() ){ $params['merchant_id'] = $merchant_id; $params = array_filter($params,'strlen'); ksort($params); $params = array_values($params); array_unshift( $params , $password ); $params = join('|',$params); return(sha1($params)); }
Generate Checkout
<?php $order_id = 'testproduct10002'; $data = $ipsp->call('checkout',array( 'order_id' => $order_id, 'order_desc' => 'Short Order Description', 'currency' => $ipsp::USD , 'amount' => 2000, // 20 USD 'response_url'=> sprintf('http://shop.example.com/checkout/%s',$order_id) ))->getResponse(); // redirect to checkoutpage header(sprintf('Location: %s',$data->checkout_url));
API Methods
Accept purchase (hosted payment page)
$data = $ipsp->call('checkout',array());
Accept purchase (merchant payment page)
$data = $ipsp->call('pcidss',array());
Purchase using card token
$data = $ipsp->call('recurring',array());
Payment report
$data = $ipsp->call('reports',array());
Order Refund
$data = $ipsp->call('reverse',array());
Check payment status
$data = $ipsp->call('status',array());
Card verification
$data = $ipsp->call('verification',array());
Order capture
$data = $ipsp->call('capture',array());
P2P card credit
$data = $ipsp->call('p2pcredit',array());
Examples
Some other ipsp examples: https://github.com/kosatyi/ipsp-php-examples.git
mintance/ipsp-php 适用场景与选型建议
mintance/ipsp-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 28 次下载、GitHub Stars 达 0, 最近一次更新时间为 2017 年 07 月 03 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「payment service provider」 「mintance」 「ipsp」 「payment service provider php」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 mintance/ipsp-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mintance/ipsp-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 mintance/ipsp-php 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A fast and intuitive dependency injection container.
Registry service.
swagger-php - Generate interactive documentation for your RESTful API using phpdoc annotations
Service auto install for Nette Framework
Structure for the Laravel Service-Repository Pattern
Base Skeleton for Laravel Application
统计信息
- 总下载量: 28
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-07-03