https://github.com/abr4xas/php-instapago
Librería Instapago para PHP
https://github.com/abr4xas/php-instapago
banesco hacktoberfest instapago php-instapago venezuela
Last synced: 6 months ago
JSON representation
Librería Instapago para PHP
- Host: GitHub
- URL: https://github.com/abr4xas/php-instapago
- Owner: abr4xas
- License: mit
- Created: 2016-01-23T03:56:24.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2025-02-03T15:42:17.000Z (8 months ago)
- Last Synced: 2025-04-09T20:05:44.680Z (6 months ago)
- Topics: banesco, hacktoberfest, instapago, php-instapago, venezuela
- Language: PHP
- Homepage: https://packagist.org/packages/instapago/instapago
- Size: 226 KB
- Stars: 18
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
Librería Instapago para PHP
NOTA Los logos son propiedad de Instapago y Banesco, respectivamente.[](https://packagist.org/packages/instapago/instapago)
[](https://github.com/abr4xas/php-instapago/actions?query=workflow%3ATests+branch%3Amaster)
[](https://packagist.org/packages/instapago/instapago)## instalación
Primero, [`composer`](https://getcomposer.org/doc/faqs/how-to-install-composer-programmatically.md)
Luego:
```
$ composer require instapago/instapago
$ composer dumpautoload -o // opcional
```### como usar
>NOTA: Tomar en cuenta que esta nueva versión fue probada usando php8.X, no aseguro que funcione en algo menor a eso, en *teoría* debería pero no estoy seguro.
```php
'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{
$api = new Api('','');
$respuesta = $api->directPayment($paymentData);
// hacer algo con $respuesta
}catch(InstapagoException $e){echo $e->getMessage(); // manejar el error
}catch(InstapagoAuthException $e){
echo $e->getMessage(); // manejar el error
}catch(InstapagoBankRejectException $e){
echo $e->getMessage(); // manejar el error
}catch(InstapagoInvalidInputException $e){
echo $e->getMessage(); // manejar el error
}catch(InstapagoTimeoutException $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
}
```Podemos revisar rápidamente si todo funciona correctamente escribiendo:
```bash
$ php -S localhost:8000
```### tests
```bash
composer test
```## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
## Contributing
Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.
## Security Vulnerabilities
Please review [our security policy](../../security/policy) on how to report security vulnerabilities.
## Credits
- [Angel Cruz](https://github.com/abr4xas)
- [All Contributors](../../contributors)## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.