PHPackages                             andreighioc/ingwebpay - 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. andreighioc/ingwebpay

ActiveLibrary[Payment Processing](/categories/payments)

andreighioc/ingwebpay
=====================

Laravel package for processing payments through ING WebPay (ING Bank Romania e-commerce gateway)

v1.0.1(1mo ago)00MITPHPPHP ^8.1

Since Apr 15Pushed 1mo agoCompare

[ Source](https://github.com/andreighioc/ingwebpay)[ Packagist](https://packagist.org/packages/andreighioc/ingwebpay)[ RSS](/packages/andreighioc-ingwebpay/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (8)Versions (3)Used By (0)

ING WebPay for Laravel
======================

[](#ing-webpay-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/25fa387dffd4bb2e420941dc06b590a70d8b3cd3eca72c55558794b878fb8656/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616e647265696768696f632f696e677765627061792e737667)](https://packagist.org/packages/andreighioc/ingwebpay)[![Total Downloads](https://camo.githubusercontent.com/4fb37527b4e289ba82cbac719089322211e54f49d230b3d7999ce1edec8de2ec/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616e647265696768696f632f696e677765627061792e737667)](https://packagist.org/packages/andreighioc/ingwebpay)[![License](https://camo.githubusercontent.com/67510a67fff505b9e67e488d3b818d2cebefa94a80807b8aaaa88cd2009bf6b7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f616e647265696768696f632f696e677765627061792e737667)](LICENSE)[![PHP Quality](https://github.com/andreighioc/ingwebpay/actions/workflows/run-tests.yml/badge.svg)](https://github.com/andreighioc/ingwebpay/actions)

A Laravel package for processing card payments through **ING WebPay** — the e-commerce payment gateway provided by ING Bank Romania.

Supports **Laravel 10, 11, 12, and 13**.

Features
--------

[](#features)

- **Full API coverage** — register (sale), registerPreAuth, getOrderStatus, getOrderStatusExtended, reverse, deposit, refund
- **Strongly-typed DTOs** — all responses are mapped to clean data objects
- **PHP 8.1+ enums** — `PaymentStatus`, `OrderStatus`, `Currency`, `Environment`
- **Plug-and-play** — `php artisan ingwebpay:install` scaffolds controller, routes, and views
- **Database support** — Optional migrations to automatically store transactions
- **Facade support** — use `IngWebPay::register(...)` anywhere
- **3D Secure v2** — enforced by default via `FORCE_3DS2`
- **Test &amp; Production** environments with separate URL configuration
- **Comprehensive tests** — unit + feature tests with faked HTTP
- **Testing Mocks** — `IngWebPay::fake()` built-in for asserting payments
- **Advanced Exceptions** — `IngAuthenticationException`, `IngEndpointUnreachableException`, etc.
- **Auto-Retry Mechanism** — Prevents transaction loss on random network failures

---

Requirements
------------

[](#requirements)

- PHP ≥ 8.1
- Laravel 10, 11, 12, or 13
- An ING WebPay merchant account (API username &amp; password)

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

[](#installation)

```
composer require andreighioc/ingwebpay
```

The service provider and facade are auto-discovered. Then run the install command:

```
php artisan ingwebpay:install
```

This publishes:

- `config/ingwebpay.php` — Configuration
- `app/Http/Controllers/IngWebPayController.php` — Payment controller
- `routes/ingwebpay.php` — Route definitions
- `resources/views/ingwebpay/` — Checkout, success, and failure views

After configuration, you can optionally publish migrations to automatically log your payments in the database:

```
php artisan vendor:publish --tag=ingwebpay-migrations
php artisan migrate
```

Verify your credentials easily using the built-in checker:

```
php artisan ingwebpay:check-connection
```

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

[](#configuration)

Add your credentials to `.env`:

```
INGWEBPAY_ENVIRONMENT=test
INGWEBPAY_USERNAME=your_api_username
INGWEBPAY_PASSWORD=your_api_password
INGWEBPAY_CURRENCY=946
INGWEBPAY_RETURN_URL=/ingwebpay/callback
INGWEBPAY_LANGUAGE=ro
INGWEBPAY_ORDER_NUMBER_MODE=merchant
```

VariableDescriptionDefault`INGWEBPAY_ENVIRONMENT``test` or `production``test``INGWEBPAY_USERNAME`API user code from ING Bank—`INGWEBPAY_PASSWORD`API password—`INGWEBPAY_CURRENCY``946` (RON) or `978` (EUR)`946``INGWEBPAY_RETURN_URL`Callback URL after payment`/ingwebpay/callback``INGWEBPAY_LANGUAGE`Payment page language (`ro` / `en`)`ro``INGWEBPAY_ORDER_NUMBER_MODE``merchant` or `auto``merchant`> **Important:** When operating in multiple currencies, ING Bank provides separate credentials for each currency. You'll need to configure accordingly.

Include the Routes
------------------

[](#include-the-routes)

Add this to your `routes/web.php`:

```
require __DIR__ . '/ingwebpay.php';
```

Usage
-----

[](#usage)

### Quick Start (Facade)

[](#quick-start-facade)

```
use AndreighioC\IngWebPay\Facades\IngWebPay;

// Register a sale transaction (amount in minor units: 102.31 RON = 10231)
$response = IngWebPay::register(
    amount: 10231,
    orderNumber: 'ORD-0001',
    description: 'Premium subscription',
    email: 'client@example.com',
);

if ($response->isSuccessful()) {
    // Redirect the customer to the ING payment page
    return redirect()->away($response->formUrl);
}

// Handle error
echo $response->errorMessage;
```

### Register a Pre-Authorization

[](#register-a-pre-authorization)

```
$response = IngWebPay::registerPreAuth(
    amount: 50000, // 500.00 RON
    orderNumber: 'PRE-0001',
);

if ($response->isSuccessful()) {
    return redirect()->away($response->formUrl);
}
```

### Check Transaction Status

[](#check-transaction-status)

```
// Basic status
$status = IngWebPay::getOrderStatus($orderId);

if ($status->isSuccessful()) {
    echo "Paid: {$status->getAmountInMajorUnits()} RON";
    echo "Card: {$status->pan}";
}

// Extended status (more details)
$extended = IngWebPay::getOrderStatusExtended($orderId);

echo $extended->actionCodeDescription;
echo $extended->getCardholderName();
echo $extended->getApprovalCode();
```

### Reverse (Cancel) a Transaction

[](#reverse-cancel-a-transaction)

```
// Before batch settlement (COT 22:00)
$result = IngWebPay::reverse($orderId);
```

### Complete a Pre-Authorization (Deposit)

[](#complete-a-pre-authorization-deposit)

```
// Full amount
$result = IngWebPay::deposit($orderId);

// Partial amount (300.00 RON)
$result = IngWebPay::deposit($orderId, 30000);
```

### Refund a Transaction

[](#refund-a-transaction)

```
// After batch settlement
$result = IngWebPay::refund($orderId, 10231); // 102.31 RON
```

### Currency Helpers

[](#currency-helpers)

```
use AndreighioC\IngWebPay\IngWebPay;

$minor = IngWebPay::toMinorUnits(102.31); // 10231
$major = IngWebPay::toMajorUnits(10231);  // 102.31
```

### Using the Enum Directly

[](#using-the-enum-directly)

```
use AndreighioC\IngWebPay\Enums\OrderStatus;

$status = OrderStatus::DEPOSITED;

$status->isSuccessful();   // true
$status->isFailed();       // false
$status->isPending();      // false
$status->label();          // "Deposited (authorized)"
```

Payment Flow
------------

[](#payment-flow)

```
1. Customer clicks "Pay" on your site
2. Your app calls IngWebPay::register(...) → receives formUrl
3. Customer is redirected to formUrl (ING WebPay payment page)
4. Customer enters card data + 3D Secure authentication
5. ING WebPay redirects back to your returnUrl with orderId
6. Your callback handler calls IngWebPay::getOrderStatusExtended($orderId)
7. Based on the status, redirect to success or failure page

```

Order Statuses
--------------

[](#order-statuses)

ValueEnumDescription0`REGISTERED`Order registered but not paid1`PREAUTHORIZED`Pre-authorized (awaiting completion)2`DEPOSITED`Authorized &amp; deposited ✅3`CANCELLED`Cancelled4`REVERSED`Reversed5`ACS_INITIATED`Initiated by issuer ACS6`DECLINED`Declined / Rejected ❌API Endpoints Reference
-----------------------

[](#api-endpoints-reference)

OperationTest URLProduction URLRegister (Sale)`securepay-uat.ing.ro/mpi_uat/rest/register.do``securepay.ing.ro/mpi/rest/register.do`Register PreAuth`securepay-uat.ing.ro/mpi_uat/rest/registerPreAuth.do``securepay.ing.ro/mpi/rest/registerPreAuth.do`Get Order Status`securepay-uat.ing.ro/mpi_uat/rest/getOrderStatus.do``securepay.ing.ro/mpi/rest/getOrderStatus.do`Get Status Extended`securepay-uat.ing.ro/mpi_uat/rest/getOrderStatusExtended.do``securepay.ing.ro/mpi/rest/getOrderStatusExtended.do`Reverse`securepay-uat.ing.ro/mpi_uat/rest/reverse.do``securepay.ing.ro/mpi/rest/reverse.do`Deposit`securepay-uat.ing.ro/mpi_uat/rest/deposit.do``securepay.ing.ro/mpi/rest/deposit.do`Testing
-------

[](#testing)

Testing your own Application implementing ING WebPay:

```
use AndreighioC\IngWebPay\Facades\IngWebPay;

public function test_user_can_checkout()
{
    IngWebPay::fake();

    $this->post('/checkout', ['product_id' => 1])
         ->assertRedirect();

    IngWebPay::assertPaymentInitiated(10231); // Verify payment of 102.31 RON was sent!
}
```

Testing the package directly:

```
composer test
```

Or directly:

```
./vendor/bin/phpunit
```

Test Environment Credentials
----------------------------

[](#test-environment-credentials)

ING provides shared test credentials (from the official guide):

- **API User:** `TEST_API` / Password: `q1w2e3r4Q!`
- **Admin User:** `TEST_ADMINISTRARE` / Password: `Ing.12345!`
- **Console:** `https://securepay-uat.ing.ro/consola/index.html`
- **Test Card (Visa):** `4256031168525366`, Exp: `05/21`, CVV: `865`, 3DS: `test123!`

> ⚠️ Do not modify these shared test passwords.

Security
--------

[](#security)

- API credentials are **never** exposed to the browser (all calls are server-to-server)
- 3D Secure v2 is enforced by default
- Card data is handled exclusively by ING WebPay (PCI DSS compliant)
- Passwords are excluded from debug logs

License
-------

[](#license)

MIT — see [LICENSE](LICENSE).

Support
-------

[](#support)

For ING WebPay technical support: `SupportWebPay@ing.ro` or call `+40 21 403 83 04`.

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance89

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

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

2

Last Release

55d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/82b6cb88da2e43e1c0d384c85e553575d60f4629bb599570871cfb4f3bed3f49?d=identicon)[andreighioc](/maintainers/andreighioc)

---

Tags

laravelpaymentgatewayecommercecardwebpayvisamastercardingRomania

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/andreighioc-ingwebpay/health.svg)

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

###  Alternatives

[spatie/laravel-responsecache

Speed up a Laravel application by caching the entire response

2.8k8.7M64](/packages/spatie-laravel-responsecache)[spatie/laravel-health

Monitor the health of a Laravel application

88011.3M149](/packages/spatie-laravel-health)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

815320.5k3](/packages/defstudio-telegraph)[simplestats-io/laravel-client

Analytics for Laravel. Track visitors, registrations, and payments. Discover which channels actually drive revenue, not just traffic. Server-side, GDPR compliant, ad-blocker proof.

5019.3k](/packages/simplestats-io-laravel-client)[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4849.3k](/packages/sebdesign-laravel-viva-payments)

PHPackages © 2026

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