PHPackages                             upgradelabs/ifthenpay - 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. upgradelabs/ifthenpay

ActiveLibrary[Payment Processing](/categories/payments)

upgradelabs/ifthenpay
=====================

Laravel package for Ifthenpay API integration (Multibanco, MBWay, Credit Card, Google Pay, Apple Pay, Refunds)

2.0.0(1y ago)092MITPHPPHP ^8.0

Since May 28Pushed 1y agoCompare

[ Source](https://github.com/upgradelabs/ifthenpay)[ Packagist](https://packagist.org/packages/upgradelabs/ifthenpay)[ RSS](/packages/upgradelabs-ifthenpay/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (4)Versions (4)Used By (0)

Upgradelabs Ifthenpay Laravel Package
=====================================

[](#upgradelabs-ifthenpay-laravel-package)

This package provides an easy integration with the Ifthenpay API for Laravel projects.

**Version compatibility**

Package versionLaravel versions supported^1.08.x, 9.x, 10.x^2.011.x, 12.xInstallation
------------

[](#installation)

Choose the right version for your project:

```
# Laravel 8–10
composer require upgradelabs/ifthenpay:^1.0

# Laravel 11–12
composer require upgradelabs/ifthenpay:^2.0
```

Publish the configuration file:

```
php artisan vendor:publish --provider="Upgradelabs\Ifthenpay\IfthenpayServiceProvider" --tag="config"
```

Set your API keys in your `.env` file:

```
IFTHENPAY_SANDBOX=true
IFTHENPAY_MB_KEY=MBK-xxxxxxxx
IFTHENPAY_MBWAY_KEY=MBWAY-xxxxxxxx
IFTHENPAY_CCARD_KEY=CCARD-xxxxxxxx
IFTHENPAY_GATEWAY_KEY=GWK-xxxxxxxx
IFTHENPAY_GOOGLE_KEY=GOOGLE-xxxxxxxx
IFTHENPAY_APPLE_KEY=APPLE-xxxxxxxx
IFTHENPAY_BACKOFFICE_KEY=BACKOFFICE-xxxxxxxx

```

Usage
-----

[](#usage)

Use the `Ifthenpay` facade for all operations:

```
use Ifthenpay;

// Create Multibanco Reference
$response = Ifthenpay::createMultibancoReference([
    'orderId' => 'order-1234',
    'amount' => '123.45',
    'description' => 'Order description',
    'url' => 'https://example.com',
    'expiryDays' => 3,
]);

// Initiate MB WAY payment
$response = Ifthenpay::createMbwayPayment([
    'orderId' => 'order-1234',
    'amount' => '123.45',
    'mobileNumber' => '912345678',
]);

// Check MB WAY payment status
$status = Ifthenpay::getMbwayStatus($response['RequestId']);

// Initialize Credit Card payment
$response = Ifthenpay::initCreditCardPayment([
    'orderId'    => 'order-1234',
    'amount'     => '123.45',
    'successUrl' => 'https://example.com/success',
    'errorUrl'   => 'https://example.com/error',
    'cancelUrl'  => 'https://example.com/cancel',
    'language'   => 'en',
]);

// Create Google Pay payment
$response = Ifthenpay::createGooglePayPayment([
    'id'          => 'order-1234',
    'amount'      => '123.45',
    'description' => 'Order description',
    'lang'        => 'en',
    'expiredate'  => '20250101',
    'btnCloseUrl'    => 'https://example.com/close',
    'btnCloseLabel'  => 'Close',
    'success_url'    => 'https://example.com/success',
    'error_url'      => 'https://example.com/error',
    'cancel_url'     => 'https://example.com/cancel',
]);

// Create Apple Pay payment
$response = Ifthenpay::createApplePayPayment([
    'id'     => 'order-1234',
    'amount' => '123.45',
]);

// Issue a refund
$response = Ifthenpay::refund('request-id-123', '50.00');
```

Testing
-------

[](#testing)

Run the tests with:

```
vendor/bin/phpunit
```

License
-------

[](#license)

MIT

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance46

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity44

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

Every ~0 days

Total

3

Last Release

401d ago

Major Versions

1.0.0 → 2.0.02025-05-28

### Community

Maintainers

![](https://www.gravatar.com/avatar/b20557c62a96fca9a58d80b11dffbaf4e3debd77d9358c66ed06d413c1e884a7?d=identicon)[rpsimao](/maintainers/rpsimao)

---

Top Contributors

[![rpsimao](https://avatars.githubusercontent.com/u/205846?v=4)](https://github.com/rpsimao "rpsimao (8 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/upgradelabs-ifthenpay/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M345](/packages/psalm-plugin-laravel)[mike-bronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k91.0k1](/packages/mike-bronner-laravel-model-caching)[illuminate/auth

The Illuminate Auth package.

10528.2M1.2k](/packages/illuminate-auth)[illuminate/routing

The Illuminate Routing package.

1419.2M3.0k](/packages/illuminate-routing)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[api-platform/laravel

API Platform support for Laravel

58171.5k14](/packages/api-platform-laravel)

PHPackages © 2026

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