nourollahr/laravel-fake-payment

A fake payment gateway package for Laravel (for testing purposes)

Installs: 1

Dependents: 0

Suggesters: 0

Security: 0

Stars: 9

Watchers: 1

Forks: 1

Open Issues: 0

pkg:composer/nourollahr/laravel-fake-payment

1.0.3 2025-09-26 21:48 UTC

This package is auto-updated.

Last update: 2025-12-26 22:28:43 UTC


README

A simple package to simulate a payment gateway in Laravel. Ideal for testing projects without using a real payment gateway.

Installation

composer require nourollahr/laravel-fake-payment

Publish Config and Views (Optional)

You can publish the config and views to customize the package behavior and appearance:

# Publish config
php artisan vendor:publish --provider="Nourollahr\FakePayment\FakePaymentServiceProvider" --tag=config

# Publish views
php artisan vendor:publish --provider="Nourollahr\FakePayment\FakePaymentServiceProvider" --tag=views

Usage

New Payment:

use FakePayment\Facades\FakePayment;

$amount = 10000;

// Optional callback URL. If null, the user will be redirected to the package's result page
$callbackUrl = route('invoices.verify'); // or null

$payment = FakePayment::pay($amount, $callbackUrl);

// Redirect user to the fake payment page
return redirect($payment['redirect_url']);