tepuilabs / laravel-instapago
Library for payments in VEF (Bsf.) in Venezuela.
Fund package maintenance!
angelcruz.dev/donate
Requires
- php: ^8.3
- instapago/instapago: ^8.0
- spatie/laravel-package-tools: ^1.15.0
Requires (Dev)
- laravel/pint: ^1.14
- nunomaduro/collision: ^7.10
- nunomaduro/larastan: ^2.9.2
- orchestra/testbench: ^8.21.1
- pestphp/pest: ^2.34.1
- pestphp/pest-plugin-arch: ^2.7.0
- pestphp/pest-plugin-laravel: ^2.3
- phpstan/extension-installer: ^1.3.1
- phpstan/phpstan-deprecation-rules: ^1.1.4
- phpstan/phpstan-phpunit: ^1.3.16
- spatie/laravel-ray: ^1.35.1
This package is auto-updated.
Last update: 2024-12-08 02:05:44 UTC
README
Library for payments in VEF (Bsf.) in Venezuela.
Library for payments in VEF (Bsf.) in Venezuela.
Installation
You can install the package via composer:
composer require tepuilabs/laravel-instapago
You can publish the config file with:
php artisan vendor:publish --tag="laravel-instapago-config"
This is the contents of the published config file:
<?php return [ 'key_id' => env('INSTAPAGO_KEY_ID'), 'public_key_id' => env('INSTAPAGO_PUBLIC_KEY_ID'), ];
Usage
use \Instapago\Instapago\Exceptions\{ InstapagoException, AuthException, BankRejectException, InvalidInputException, TimeoutException, ValidationException, GenericException, }; $paymentData = [ 'amount' => '200', 'description' => 'test', 'card_holder' => 'jon doe', 'card_holder_id' => '11111111', 'card_number' => '4111111111111111', 'cvc' => '123', 'expiration' => '12/2020', 'ip' => '127.0.0.1', ]; try{ $response = LaravelInstapago::directPayment($paymentData); // hacer algo con $respuesta }catch(InstapagoException $e){ echo $e->getMessage(); // manejar el error }catch(AuthException $e){ echo $e->getMessage(); // manejar el error }catch(BankRejectException $e){ echo $e->getMessage(); // manejar el error }catch(InvalidInputException $e){ echo $e->getMessage(); // manejar el error }catch(TimeoutException $e){ echo $e->getMessage(); // manejar el error }catch(ValidationException $e){ echo $e->getMessage(); // manejar el error }catch(GenericException $e){ echo $e->getMessage(); // manejar el error }
TODO: add more docs
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.