PHP code example of coreproc / paymaya-laravel
1. Go to this page and download the library: Download coreproc/paymaya-laravel library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
coreproc / paymaya-laravel example snippets
return [
'environment' => env('PAYMAYA_ENVIRONMENT', PayMayaClient::ENVIRONMENT_SANDBOX),
'key' => env('PAYMAYA_KEY'),
'secret' => env('PAYMAYA_SECRET'),
'webhooks' => [
'checkout_success' => env('PAYMAYA_WEBHOOKS_CHECKOUT_SUCCESS'),
'checkout_failure' => env('PAYMAYA_WEBHOOKS_CHECKOUT_FAILURE'),
'checkout_dropout' => env('PAYMAYA_WEBHOOKS_CHECKOUT_DROPOUT'),
'payment_success' => env('PAYMAYA_WEBHOOKS_PAYMENT_SUCCESS'),
'payment_failed' => env('PAYMAYA_WEBHOOKS_PAYMENT_FAILED'),
'payment_expired' => env('PAYMAYA_WEBHOOKS_PAYMENT_EXPIRED'),
],
];
return [
'webhooks' => [
'payment_success' => 'hooks.paymaya.success',
'payment_failed' => 'hooks.paymaya.failed',
'payment_expired' => 'hooks.paymaya.expired',
],
];
bash
php artisan vendor:publish --provider="Coreproc\Paymaya\PaymayaServiceProvider" --tag="config"
php artisan paymaya:install-webhook