Download the PHP package soap/laravel-omise without Composer
On this page you can find all versions of the php package soap/laravel-omise. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download soap/laravel-omise
More information about soap/laravel-omise
Files in soap/laravel-omise
Package laravel-omise
Short Description Make Omise payment gateway integration easier with Laravel
License MIT
Homepage https://github.com/soap/laravel-omise
Informations about the package laravel-omise
Laravel Omise Integration with Ease
Make Omise payment gateway integration easier with Laravel.
Support us
Installation
You can install the package via composer:
You can publish the config file with:
This is the contents of the published config file:
Usage
You have to register with Omise, then fill in the keys as in the configuration file. Note: you just add your keys in the .env file, and then test if it is valid using artisan command.
Create Omise API Objects
To create Omise API objects like Charge, Source, Customer you can use Laravel independency injection (Soap\LaravelOmise\Omise) or use app('omise') and the access them like this:
Here is the example usage from Controller:
Artisan Commands
Display status of account
Get account balance
Verification
To validate your configuration provided in .env use the following code. Or you can use artisan command omise:verify.
Account
You can use account to retrieve account information from Omise, or configure some configuration parameter. For now I just add updateWebhookUri($uri).
Customer
Charge
Find a charge object created
To find charge transaaction using id (string provided by Omise), using find() method of charge object. You can using an id provided by a webhook called from Omise to confirm for a payment. If you want to use webhook, please visit my package; soap/laravel-omise-webhooks
Charge customer for some amount
To use a charge object to make a payment, you have to consult Omise workflow for each supported type of payment. To create a credit card payment, on frontend use Javascript to get charge token first. Then you can call charge->create() to make a corresponding payment.
Following code is what I used in one of my project supports Promptpay and Credit card payment. The first one, is credit card payment.
The second one is Promptpay, an offline payment. Omise create QRcode for us, then we display it for customer to scan to make a payment.
And this some part showing how to use it in controller.
Refund
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Prasit Gebsaap
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-omise with dependencies
spatie/laravel-package-tools Version ^1.16
laravel/framework Version ^10.0||^11.0||^12.0
omise/omise-php Version ^2.0||^3.0
spatie/once Version *