pipisco/laravel-verotel-flexpay
PaymentCreated, PaymentFailed) for downstream integrations (e.g., notifications, analytics).payments table with fields like:
Schema::create('payments', function (Blueprint $table) {
$table->id();
$table->string('verotel_id')->unique();
$table->string('gateway_response');
$table->enum('status', ['pending', 'completed', 'failed', 'refunded']);
$table->unsignedBigInteger('user_id')->nullable();
$table->unsignedBigInteger('order_id')->nullable();
$table->timestamps();
});
VerotelFlexPay facade in unit tests:
$this->mock(VerotelFlexPay::class)->shouldReceive('createSubscription')->andReturn(...);
composer.json (e.g., pipisco/laravel-verotel-flexpay:^1.0).guzzlehttp/guzzle).composer why-not to resolve dependency conflicts..env variables and publish the package’s config:
php artisan vendor:publish --provider="Pipisco\VerotelFlexPay\VerotelFlexPayServiceProvider"
config/app.php.PaymentService facade or repository to abstract Verotel calls:
namespace App\Services;
use Pipisco\VerotelFlexPay\Facades\VerotelFlexPay;
class PaymentService {
public function createSubscription(array $data) {
return VerotelFlexPay::createSubscription($data);
}
}
VerotelFlexPay.init({
publicKey: 'YOUR_PUBLIC_KEY',
onSuccess: (response) => { /* Handle success */ },
onError: (error) => { /* Handle error */ }
});
payment.succeeded).Route::post('/verotel/webhook', [PaymentWebhookController::class, 'handle']);
composer normalize to manage version constraints.VEROTEL_FLEXPAY_SECRET) in a secrets manager (e.g., AWS Secrets Manager, Laravel Forge) for production.'log' => [
'enabled' => env('VEROTEL_LOG_ENABLED', true),
'path' => storage_path('logs/verotel.log'),
],
telescope or laravel-debugbar to inspect payment requests/responses.INVALID_CARD) and their resolutions for support teams.How can I help you explore Laravel packages today?