Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tepuilabs/laravel-instapago
Library for payments in VEF (Bsf.) in Venezuela.
https://github.com/tepuilabs/laravel-instapago
hacktoberfest instapago laravel payment-gateway php venezuela
Last synced: 20 days ago
JSON representation
Library for payments in VEF (Bsf.) in Venezuela.
- Host: GitHub
- URL: https://github.com/tepuilabs/laravel-instapago
- Owner: TepuiLABS
- License: mit
- Created: 2020-12-15T23:15:37.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-07-08T01:14:30.000Z (7 months ago)
- Last Synced: 2024-11-24T20:51:47.964Z (2 months ago)
- Topics: hacktoberfest, instapago, laravel, payment-gateway, php, venezuela
- Language: PHP
- Homepage: https://packagist.org/packages/tepuilabs/laravel-instapago
- Size: 140 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# Library for payments in VEF (Bsf.) in Venezuela.
[![Latest Version on Packagist](https://img.shields.io/packagist/v/tepuilabs/laravel-instapago.svg?style=flat-square)](https://packagist.org/packages/tepuilabs/laravel-instapago)
[![Tests](https://img.shields.io/github/actions/workflow/status/TepuiLABS/laravel-instapago/run-tests.yml?style=flat-square)](https://github.com/TepuiLABS/laravel-instapago/actions?query=workflow%3ATests+branch%3Amaster)
[![Total Downloads](https://img.shields.io/packagist/dt/tepuilabs/laravel-instapago.svg?style=flat-square)](https://packagist.org/packages/tepuilabs/laravel-instapago)Library for payments in VEF (Bsf.) in Venezuela.
## Installation
You can install the package via composer:
```bash
composer require tepuilabs/laravel-instapago
```You can publish the config file with:
```bash
php artisan vendor:publish --tag="laravel-instapago-config"
```This is the contents of the published config file:
```php
env('INSTAPAGO_KEY_ID'),
'public_key_id' => env('INSTAPAGO_PUBLIC_KEY_ID'),
];
```## Usage
```php
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
```bash
composer test
```## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
## Contributing
Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.
## Credits
- [angel cruz](https://github.com/abr4xas)
- [All Contributors](../../contributors)## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.