arca/payment-gateways 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

arca/payment-gateways

最新稳定版本:1.0.2

Composer 安装命令:

composer require arca/payment-gateways

包简介

payment gateway integration in laravel

README 文档

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This package seeks to implement Chilean payment gateways and in general for Laravel allowing easy payment integration.

Payment gateways added:

  • Webpay
  • Getnet
  • PayPal
  • Flow

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',
        ],
    ],
];

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.

统计信息

  • 总下载量: 149
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-02-28