digitickets/omnipay-savvy-gift-card
Composer 安装命令:
composer require digitickets/omnipay-savvy-gift-card
包简介
Savvy Gift Card driver for the Omnipay payment processing library
README 文档
README
Savvy Gift Card redemptions driver for the Omnipay PHP payment processing library
Omnipay implementation of Savvy Gift Card redemption. Obviously it's not a payment gateway, but it behaves in a similar way.
See their technical documentation for more details.
Installation
Important: Driver requires PHP's Intl extension to be installed.
The Savvy Gift Card Omnipay driver is installed via Composer. To install, simply add it
to your composer.json file:
{
"require": {
"digitickets/omnipay-savvy-gift-card": "^1.0"
}
}
And run composer to update your dependencies:
$ curl -s http://getcomposer.org/installer | php
$ php composer.phar update
What's Included
The driver for Savvy Gift Cards. It allows you to validate and redeem a card, and reverse a previous redemption.
It supports making requests with and without a PIN.
It can automatically revert a redemption where there were insufficient funds.
What's Not Included
This driver does not handle any of the other card management operations, such as loading a card, unfreezing, unloading, doing an ad hoc refund, etc.
Basic Usage
For the driver in this repo, there are voucher-type requests, namely validate, redeem and unredeem, and there is a subset of the normal "Omnipay" requests, namely authorize, purchase and refund.
Use the voucher-type requests when you're treating the vouchers as vouchers; use the "Omnipay" requests when you are treating them as payments.
For general Omnipay usage instructions, please see the main Omnipay repository.
Running with/without a PIN
By default, the driver assumes that you are using PINs; it will call the endpoints that require a PIN.
There is a parameter, usePIN. If true, it assumes you are using PINs. If false, it assumes you are not using PINs and will call the "*nopin" endpoints where necessary. It defaults to true.
Handling redemptions with insufficient funds
If you attempt to redeem a gift card where the redemption amount is greater than the current balance on the card, the API will reduce the current balance to zero and return a response code of "30".
This is not ideal as money has been taken off the card, but the API returns an error.
There is therefore a parameter, failOnInsufficientFunds to say what to do. If true, it will immediately revert the redemption (so the card ends up with the balance that it started with) and will return the original, error, response.
If set to false, it will simply adjust the response to have a response code of "0" and an amount equal to the actual amount taken off the card, and do nothing else. In this case, it's up to the merchant to compare the requested amount with the response amount to detect if there were insufficient funds.
Support
If you are having general issues with Omnipay, we suggest posting on Stack Overflow. Be sure to add the omnipay tag so it can be easily found.
If you believe you have found a bug in this driver, please report it using the GitHub issue tracker, or better yet, fork the library and submit a pull request.
digitickets/omnipay-savvy-gift-card 适用场景与选型建议
digitickets/omnipay-savvy-gift-card 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 37.94k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2020 年 10 月 15 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「web」 「service」 「gateway」 「merchant」 「omnipay」 「gift card」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 digitickets/omnipay-savvy-gift-card 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 digitickets/omnipay-savvy-gift-card 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 digitickets/omnipay-savvy-gift-card 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
repository php library
Model of a web-based resource
Payyo Gateway for the Omnipay payment processing library
A fast and intuitive dependency injection container.
Registry service.
Retrieve a WebResourceInterface instance over HTTP
统计信息
- 总下载量: 37.94k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-10-15