yousef/payment-gateway
Composer 安装命令:
composer require yousef/payment-gateway
包简介
This package makes everything is simple, this payment method support (Visa, MasterCard)
README 文档
README
This package makes everything is simple, Payment method supported (Visa, MasterCard)
Installation
Install via composer
composer require yousef/payment-gateway
Configuration
Add the PaymentGatewayServiceProvider class in your config/app.php file.
<?php return [ // ... 'providers' => [ Yousef\PaymentGateway\PaymentGatewayServiceProvider::class, ]; // ... ];
Publish vendor config files if you need to replace by your own.
php artisan vendor:publish
Usage
Let's say you need use master, visa to pay orders online in your store, now using Payment Gateway package every thing is easy to integrate more readability and Testability. Payment Gateway package support multi currency like [KWD, AED, BHD, QAR, JOD] and anyone can add easy to modify.
<?php Payment::createSession($amount, $transactionId, $currency); Payment::pay($transactionId);
Add, modify currency configuration multi-currency-gateway.php
return [ ..., 'KWD' => [ 'certificate_verify_peer' => env('CERTIFICATE_VERIFY_PEER', false), 'certificate_verify_host' => env('CERTIFICATE_VERIFY_HOST', 0), 'gateway_url' => env('GATEWAY_URL', ''), 'username'=> env('MERCHANT_USERNAME_KWD', ''), 'merchant_id' => env('MERCHANT_ID_KWD', 0), 'password'=> env('MERCHANT_PASSWORD_KWD', ''), 'merchant_email' => env('MERCHANT_EMAIL_KWD', 0), 'debug' => env('DEBUG', false), 'version' => env('VERSION', 61), 'operations' => [ 'new_session' => 'CREATE_CHECKOUT_SESSION', 'retrieve_order' => 'RETRIEVE_ORDER', ] ],
Custom exception classes
NotCaptured::class
InvalidAmount::class
InvalidTransactionId::class
Add own configuration in .env file the DEFAULT_CURRENCY is USD
VERSION="" GATEWAY_URL="" MERCHANT_ID_USD="" MERCHANT_EMAIL_USD="" MERCHANT_USERNAME_USD="" MERCHANT_PASSWORD_USD="" MERCHANT_ID_KWD="" MERCHANT_EMAIL_KWD="" MERCHANT_USERNAME_KWD="" MERCHANT_PASSWORD_KWD=""
Getting Help
If you're stuck getting something to work, or need to report a bug, please post an issue in the Github Issues for this project.
Contributing
If you're interesting in contributing code to this project, clone it by running:
git clone git@github.com:yousefdev20/laravel-payment-gateway.git
License
This project is open-sourced software licensed under the MIT license.
yousef/payment-gateway 适用场景与选型建议
yousef/payment-gateway 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 47 次下载、GitHub Stars 达 1, 最近一次更新时间为 2022 年 05 月 25 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 yousef/payment-gateway 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 yousef/payment-gateway 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 47
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-05-25