Download the PHP package ttrig/laravel-billmate without Composer
On this page you can find all versions of the php package ttrig/laravel-billmate. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ttrig/laravel-billmate
More information about ttrig/laravel-billmate
Files in ttrig/laravel-billmate
Package laravel-billmate
Short Description Laravel package for working with Billmate API
License MIT
Homepage https://github.com/ttrig/laravel-billmate
Informations about the package laravel-billmate
Laravel Billmate
Laravel package for interacting with Billmate API.
Installation
Configuration
Publish the configuration file using this command:
Add a Billmate ID and key in .env
.
Update config/billmate.php
to use your own controller(s).
General payment flow
- https://developer.billmate.se/checkout-documentation
- https://developer.billmate.se/api-integration/getpaymentinfo
- https://developer.billmate.se/api-integration/initcheckout
Usage example
Checkout
You can view or update the data to be sent to Billmate by passing a callback
as second argument to initCheckout
.
View
To render the Billmate Checkout iframe you can use $checkout->iframe()
in
your blade template or write your own iframe and pass $checkout->url
to its src
attribute.
JavaScript
To update height of the Checkout when it updates, we need this JavaScript.
Redirect controller
You need your own controller(s) for handling the accept and cancel redirections.
Callback controller
If you use Ttrig\Billmate\Controllers\CallbackController::class
as your
"callback_action" in config/billmate.php
, you need to listen to the
Ttrig\Billmate\Events\OrderCreated
event in your EventServiceProvider
to handle the order.
Read more about events at https://laravel.com/docs/10.x/events.
Contributing
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b amazing-feature
) - Commit your Changes (
git commit -m 'Add some amazing feature
) - Push to the Branch (
git push origin amazing-feature
) - Open a Pull Request
License
laravel-billmate is open-sourced software licensed under the MIT license.