PHPackages                             rick20/faspay - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. rick20/faspay

ActiveLibrary[Payment Processing](/categories/payments)

rick20/faspay
=============

A Laravel package for Faspay Payment Gateway.

0.1.0(9y ago)5101PHPPHP &gt;=5.5.9

Since Apr 19Pushed 9y ago2 watchersCompare

[ Source](https://github.com/rick20/faspay)[ Packagist](https://packagist.org/packages/rick20/faspay)[ RSS](/packages/rick20-faspay/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

Faspay Payment Gateway Package for Laravel 5
============================================

[](#faspay-payment-gateway-package-for-laravel-5)

Use Faspay as your payment gateway for your project? Then this package is for you. This is a laravel package to communicate with [Faspay Payment Gateway API](https://mediaindonusa.com) (currently only support DEBIT API)

Installation
------------

[](#installation)

To get started with Faspay, run this command or add the package to your `composer.json`

```
composer require rick20/faspay

```

Configuration
-------------

[](#configuration)

After installing the Faspay package, register the `Rick20\Faspay\FaspayServiceProvider` in your `config/app.php` file. Also, add the `Faspay` and `Payment` facade to the `aliases` array in your `app` configuration file:

```
'Faspay' => Rick20\Faspay\Facades\Faspay::class,
'Payment' => Rick20\Faspay\Facades\Payment::class,
```

Finally publish the config file:

```
php artisan vendor:publish --provider="Rick20\Faspay\FaspayServiceProvider"

```

and change `merchant_id`, `merchant_name`, `user_id`, and `password` in the `config/faspay.php` with yours.

How To Use
----------

[](#how-to-use)

After all sets, use this Faspay package as follows:

```
// Customer class example. You can apply to any model you want.

use Rick20\Faspay\CustomerInterface;

class Customer implements CustomerInterface
{
  public function getFaspayCustomerNumber()
  {
    return 'customer-number';
  }

  public function getFaspayCustomerName()
  {
    return 'customer-name';
  }

  public function getFaspayCustomerEmail()
  {
    return 'customer-email';
  }

  public function getFaspayCustomerPhone()
  {
    return 'customer-phone';
  }

  public function getFaspayPreferredCurrency()
  {
    return 'customer-currency';
  }
}
```

```
// Item class example. You can apply to any model you want.

use Rick20\Faspay\Payable;

class Item implements Payable
{
  public function getPayableName()
  {
    return 'Product Name';
  }

  public function getPayablePrice()
  {
    return 300000;
  }
}
```

```
// An example how to use the API.

Route::get('/', function () {

  $customer = new Customer();
  $payable = new Item();

  $payment = Payment::performedBy($customer)
    ->via('web')
    ->payWith('tcash')
    ->addTax(10)
    ->addMiscFee(1000);

  $payment->addItem($payable, 2);

  $response = Faspay::registerPayment($payment);

  return Faspay::redirectToPay($payment);
});

Route::get('/callback-notif', function(\Illuminate\Http\Request $request) {
  return Faspay::notified($request, function(\Rick20\Faspay\Notification $notification) {
    return $notification;
  });
});
```

To generate a custom billing number/code, you can create a class that implements BillingProfileInterface, for example:

```
class TopupBillingProfile implements BillingProfileInterface
{
  public function description()
  {
    return 'Topup Saldo';
  }

  public function generate(Payment $payment)
  {
    return str_random(15);
  }
}
```

and then pass it as a second argument of `registerPayment()` method.

Bugs &amp; Improvements
-----------------------

[](#bugs--improvements)

This package is far from perfect. It doesn't support BCA KlikPay yet. It doesn't support Faspay Credit API also. Feel free to report me any bug you found or send me pull requests.

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3352d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6e7fec185ff90ca8ab547b702291bea3f6541842b69c6fed53787dfe53fefd41?d=identicon)[rick20](/maintainers/rick20)

---

Top Contributors

[![rick20](https://avatars.githubusercontent.com/u/1517180?v=4)](https://github.com/rick20 "rick20 (2 commits)")

### Embed Badge

![Health badge](/badges/rick20-faspay/health.svg)

```
[![Health](https://phpackages.com/badges/rick20-faspay/health.svg)](https://phpackages.com/packages/rick20-faspay)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k532.1M19.4k](/packages/laravel-framework)[statamic/cms

The Statamic CMS Core Package

4.8k3.5M916](/packages/statamic-cms)[illuminate/http

The Illuminate Http package.

11937.2M6.5k](/packages/illuminate-http)[spatie/laravel-export

Create a static site bundle from a Laravel app

672139.5k6](/packages/spatie-laravel-export)[moonshine/moonshine

Laravel administration panel

1.3k239.9k75](/packages/moonshine-moonshine)[imdhemy/google-play-billing

Google Play Billing

491.4M5](/packages/imdhemy-google-play-billing)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
