PHP code example of filano / laravel-paygate-global
1. Go to this page and download the library: Download filano/laravel-paygate-global 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/ */
// Messages de statut en français
$message = PayGateGlobal::getStatusMessage(0); // "Paiement réussi avec succès"
$message = PayGateGlobal::getTransactionStatusMessage(2); // "Jeton d'authentification invalide"
// Validation de signature webhook
$isValid = PayGateGlobal::validateWebhookSignature($payload, $signature);
bash
# Publier la configuration
php artisan vendor:publish --tag=paygate-global-config
# Publier les migrations (optionnel)
php artisan vendor:publish --tag=paygate-global-migrations
# Exécuter les migrations
php artisan migrate
env
# OBLIGATOIRE
PAYGATE_GLOBAL_AUTH_TOKEN=xxxx-xxxxx-468c-81aa-xxxxxxxx
# IMPORTANT - URL où PayGateGlobal enverra les notifications de paiement
# Si non définie, utilisera: https://votre-site.com/paygate-global/webhook
PAYGATE_GLOBAL_CALLBACK_URL=https://votre-site.com/paygate-global/webhook
# OPTIONNEL - Pour la sécurité des webhooks (recommandé)
PAYGATE_GLOBAL_WEBHOOK_SECRET=votre-secret-webhook
# OPTIONNEL - Paramètres avancés (valeurs par défaut)
PAYGATE_GLOBAL_TIMEOUT=30
PAYGATE_GLOBAL_LOG_REQUESTS=true
# DÉVELOPPEMENT UNIQUEMENT - SSL Certificate
# Désactiver la vérification SSL en environnement local (défaut: true)
PAYGATE_GLOBAL_VERIFY_SSL=false
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.