live-controls / payment
Payment package for live-controls
2.1.7
2024-02-15 10:08 UTC
Requires
- guzzlehttp/guzzle: ^7.8
Requires (Dev)
This package is auto-updated.
Last update: 2024-11-15 11:52:42 UTC
README
Helper classes and objects to create online checkouts for IUGU and PagSeguro.
No warranty for any unwanted sideeffects!
Requirements
- PHP 8.0+
- GuzzleHttp\Guzzle
Translations
None
Installation
- Install Payment package
composer require live-controls/payment
- Add PAGSEGURO_EMAIL_DEBUG and PAGSEGURO_TOKEN_DEBUG
- Add PAGSEGURO_EMAIL and PAGSEGURO_TOKEN
- Publish configuration file
php artisan vendor:publish --tag="livecontrols.payment.config"
Configuration
- 'logging' => If set to true, the library will log the requests and responses even in production mode.
- 'debug' => Defaults to the applications debug mode. This way you can set the library to debug mode, without setting the whole application to it.
- 'pagseguro_email_debug' => The email from your pagseguro account to be used in debug/sandbox mode.
- 'pagseguro_token_debug' => The token from your pagseguro account to be used in debug/sandbox mode. (Needs to be your sandbox token, else an exception will be thrown)
- 'pagseguro_email' => The email from your pagseguro account to be used in production mode.
- 'pagseguro_token' => The token from your pagseguro account to be used in production mode. (Needs to be your production token, else an exception will be thrown)
Content
- Transparent Checkout for IUGU (incl. PaymentItem and PaymentSender classes)
- Redirect Checkout for PagSeguro (incl. PaymentItem, ShippingInformation,
PaymentReceiverand PaymentSender classes)
Usage
IUGU
Warning: No longer updated, but should probably work
PagSeguro
- Create Token for testing and for production on PagSeguro (If you don't know how, ask PagSeguro)