Basic laravel boiler plate for consuming Paymaya checkout APIs
stonedleaf/paymaya-checkout-laraplate is a Laravel package for basic laravel boiler plate for consuming paymaya checkout apis.
It currently has 0 GitHub stars and 14 downloads on Packagist (latest version v0.2).
Install it with composer require stonedleaf/paymaya-checkout-laraplate.
Discover more Laravel packages by stonedleaf
or browse all Laravel packages to compare alternatives.
Last updated
Basic starter kit for consuming PayMaya checkout APIs in Laravel
Includes:
Install using composer
composer require stonedleaf/paymaya-checkout-laraplate
Publish the files
php artisan vendor:publish --provider=Stonedleaf\PaymayaCheckoutLaraplate\PaymayaServiceProvider
To register the webhooks, run the following command (Note: this will remove existing webhooks)
php artisan paymaya:webhook
To delete all paymaya API settings (Webhook and Shop Customizations), run the following command
php artisan paymaya:clear
Configuration File
Kindly check config/paymaya.php
Overriding Transaction Model
To use your own transaction model, inform your new transaction model in your application's App\Providers\AppServiceProvider class using the following code as reference
use App\Models\PayMaya\Transaction;
public function boot()
{
Paymaya::useTransactionModel(Transaction::class);
}
Overriding Migrations
If you would like to prevent the default migrations from running, you may use ignoreMigrations. Usually this should be called in the register method of your AppServiceProvider
use Stonedleaf\PaymayaCheckoutLaraplate\Paymaya;
public function register()
{
Paymaya::ignoreMigrations();
}
Afterwards, you may use your own migrations. Make sure you replaced the transaction model above
Overriding Routes
If you would like to prevent the default routes from running, you may use ignoreMigrations. Usually this should be called in the register method of your AppServiceProvider
use Stonedleaf\PaymayaCheckoutLaraplate\Paymaya;
public function register()
{
Paymaya::ignoreRoutes();
}
Afterwards, make sure you point the webhook_routes setting in config/paymaya.php to the correct routes.
For webhook controller reference, you may check Stonedleaf\PaymayaCheckoutLaraplate\Http\Controllers\WebhookController.php
< under construction >
For API, you may checkout Stonedleaf\PaymayaCheckoutLaraplate\CheckoutBuilder.php
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.