arca/payment-gateways
Composer 安装命令:
composer require arca/payment-gateways
包简介
payment gateway integration in laravel
README 文档
README
This package seeks to implement Chilean payment gateways and in general for Laravel allowing easy payment integration.
Payment gateways added:
- Webpay
- Getnet
- PayPal
- Flow
- Niubiz
Support us
If you want another payment gateway, write without problem and I will try to implement it.
Installation
You can install the package via composer:
composer require arca/payment-gateways
You can publish and run the migrations with:
php artisan vendor:publish --tag="payment-gateways-migrations"
php artisan migrate
You can publish the config file with:
php artisan vendor:publish --tag="payment-gateways-config"
This is the contents of the published config file:
return [ 'getnet' => [ 'commerce_name' => 'Getnet Nombre de Comercio', 'login' => env('GETNET_LOGIN', ''), 'tranKey' => env('GETNET_TRAN_KEY', ''), 'controller' => \Arca\PaymentGateways\Http\Controllers\GetnetController::class, ], 'webpay' => [ 'commerce_name' => 'Webpay Nombre de Comercio', 'commerce_code' => env('WEBPAY_CODE', ''), 'commerce_api_key' => env('WEBPAY_API_KEY', ''), 'controller' => \Arca\PaymentGateways\Http\Controllers\WebpayController::class, ], 'paypal' => [ 'commerce_name' => 'Paypal Nombre de Comercio', 'client_id' => env('PAYPAL_CLIENT_ID', ''), 'client_secret' => env('PAYPAL_CLIENT_SECRET', ''), 'controller' => \Arca\PaymentGateways\Http\Controllers\PaypalController::class, ], 'flow' => [ 'commerce_name' => 'Flow Nombre de Comercio', 'api_key' => env('FLOW_API_KEY'), 'secret_key' => env('FLOW_SECRET'), 'controller' => \Arca\PaymentGateways\Http\Controllers\FlowController::class, 'status' => [ '1' => 'pendiente de pago', '2' => 'pagada', '3' => 'rechazada', '4' => 'anulada', '-1' => 'Tarjeta inválida', '-11' => 'Excede límite de reintentos de rechazos', '-2' => 'Error de conexión', '-3' => 'Excede monto máximo', '-4' => 'Fecha de expiración inválida', '-5' => 'Problema en autenticación', '-6' => 'Rechazo general', '-7' => 'Tarjeta bloqueada', '-8' => 'Tarjeta vencida', '-9' => 'Transacción no soportada', '-10' => 'Problema en la transacción', '999' => 'Error desconocido', ], ], 'niubiz' => [ 'commerce_name' => 'Niubiz Nombre de Comercio', 'merchant_id' => env('NIUBIZ_MERCHANT_ID', ''), 'user' => env('NIUBIZ_USER', ''), 'password' => env('NIUBIZ_PASSWORD', ''), 'controller' => \Arca\PaymentGateways\Http\Controllers\NiubizController::class, ], ];
You can publish the assets file with:
php artisan vendor:publish --tag="payment-gateways-assets"
Optionally, you can publish the views using
php artisan vendor:publish --tag="payment-gateways-views"
Events
php artisan make:listener YourListenerClass --event=PaymentApproved php artisan make:listener Your2ListenerClass --event=PaymentRejected
EventServiceProvider
protected $listen = [ PaymentApproved::class => [ YourListenerClass::class, ], PaymentRejected::class => [ Your2ListenerClass::class, ], ];
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
arca/payment-gateways 适用场景与选型建议
arca/payment-gateways 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 712 次下载、GitHub Stars 达 1, 最近一次更新时间为 2024 年 02 月 28 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「flow」 「paypal」 「laravel」 「webpay」 「payment-gateways」 「GetNet」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 arca/payment-gateways 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 arca/payment-gateways 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 arca/payment-gateways 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
PayPal SDK for ExpressCheckout and AdaptivePayments. Supports recurring payments, simple payments, parallel payments and chained payments.
Put images nicley in a row
Create link to static resources with cache-breaking segment based on md5 of the file
A PayPal IPN (Instant Payment Notification) listener for PHP
Librería para la gestión sencilla de pagos mediante TPV Redsys y Paypal
getting and sending flow
统计信息
- 总下载量: 712
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 18
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-02-28