PHPackages                             unquam/ing-web-pay-sdk - 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. [API Development](/categories/api)
4. /
5. unquam/ing-web-pay-sdk

ActiveLibrary[API Development](/categories/api)

unquam/ing-web-pay-sdk
======================

Laravel SDK for ING Web Pay integration. Provides a clean and simple interface for initiating and handling payments through the ING Web Pay system.

v1.0.0(10mo ago)2671[1 PRs](https://github.com/Unquam/ing-web-pay-sdk/pulls)MITPHPPHP ^8.1

Since Jul 11Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/Unquam/ing-web-pay-sdk)[ Packagist](https://packagist.org/packages/unquam/ing-web-pay-sdk)[ RSS](/packages/unquam-ing-web-pay-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

IngWebPay SDK for PHP
=====================

[](#ingwebpay-sdk-for-php)

[![License: MIT](https://camo.githubusercontent.com/784362b26e4b3546254f1893e778ba64616e362bd6ac791991d2c9e880a3a64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e737667)](...)[![Packagist Version](https://camo.githubusercontent.com/195495c63e614265484b8403d62343822b69b736431cfd1a391aeff0dad18ba8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f756e7175616d2f696e672d7765622d7061792d73646b)](...)

[![ING Logo](https://camo.githubusercontent.com/715ab205cd03eb3a3578d723960a558d7e4a2d5e14a2adf6a084a00772441c4a/68747470733a2f2f696e672e726f2f64616d2f696e67726f2f696d616765732f6c6f676f2e737667)](https://camo.githubusercontent.com/715ab205cd03eb3a3578d723960a558d7e4a2d5e14a2adf6a084a00772441c4a/68747470733a2f2f696e672e726f2f64616d2f696e67726f2f696d616765732f6c6f676f2e737667)

This SDK provides a simple PHP integration with the ING WebPay payment gateway. It allows you to initialize payment orders, send requests, and check order statuses.

Features
--------

[](#features)

- Set order details (amount, currency, description)
- Set customer details (contact and billing/shipping addresses)
- Send payment initialization requests
- Fetch and parse order status responses
- Simple error handling with `error_log`
- Optional custom configuration via constructor
- Compatible with PHP 7.4+

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

[](#installation)

You can install the SDK via Composer:

> SDK version: **v1.0.0**

```
composer require unquam/ing-web-pay-sdk
```

If you're using this SDK as a Laravel package, publish the configuration file using Artisan:

```
php artisan vendor:publish --provider="Unquam\IngWebPaySdk\IngWebPayServiceProvider" --tag="config"
```

Composer Autoload
-----------------

[](#composer-autoload)

This SDK supports Composer autoloading.
If you installed the package via Composer, it will be automatically loaded by Composer's autoloader, so you can use the classes without manual `require` or `include`.

If you're not using Laravel, make sure to include Composer's autoload:

```
require __DIR__ . '/vendor/autoload.php';
```

Configuration File Example (`config/ing-web-pay.php`)
-----------------------------------------------------

[](#configuration-file-example-configing-web-payphp)

```
return [
    // ING WebPay API username (use 'TEST_API' for testing, replace with your production username)
    'username' => 'TEST_API',

    // ING WebPay API password (use test password during development, replace with your production password)
    'password' => 'q1w2e3r4Q!',

    // ... other configuration options
];
```

This will copy the default config file to your Laravel project's config/ing-web-pay.php, where you can customize credentials and URLs.

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

[](#configuration)

KeyDescriptionExample`username`Your IngWebPay username`"myuser"``password`Your IngWebPay password`"mypassword"``return_url`URL where the user will be redirected after payment`"https://your-site.com/return"``post_action`WebPay payment initiation URL`env('ING_TEST_INDICATOR', 1) ? 'https://securepay-uat.ing.ro/mpi_uat/rest/register.do' : 'https://securepay.ing.ro/mpi/rest/register.do'``order_status`WebPay order status query URL`env('ING_TEST_INDICATOR', 1) ? 'https://securepay-uat.ing.ro/mpi_uat/rest/getOrderStatusExtended.do' : 'https://securepay.ing.ro/mpi/rest/getOrderStatus.do'``certificate`Optional path to SSL certificate for verification`"/path/to/ChainBundle2.crt"``protocol`Set protocol http or https`env('APP_PROTOCOL', 'https://') ``check_amount`Check amount`1` (check amount) or `0` (otherwise)`language`Choise language`ro` for Romanian `en` for English`test_indicator`Set to 1 to disable SSL verification for testing`1` (test) or `0` (production)Environment Variables (.env)
----------------------------

[](#environment-variables-env)

Configure the following variables in your `.env` file to set up the SDK properly:

```
# ING WebPay environment indicator:
# Set to 1 to enable test mode (SSL verification disabled)
# Set to 0 to enable production mode (SSL verification enabled)
ING_TEST_INDICATOR=1

# URL where the user will be redirected after payment.
# Replace 'https://your-site.com/your-return-path' with your actual return URL.
ING_RETURN_URL='https://your-site.com/your-return-path'

# Protocol used by your application (http or https)
APP_PROTOCOL=http
```

Example Usage
-------------

[](#example-usage)

Here's a simple example demonstrating how to initialize a payment using the `IngWebPayGateway`:

```
use Unquam\IngWebPaySdk\IngWebPayGateway;

$gateway = new IngWebPayGateway();

// The customerDetails parameter is optional. If you don’t need to include billing or contact information, you can omit it entirely from the request.

$response = $gateway->initializePayment([
    'order' => 'ORDER123',
    'amount' => 100.00,
    'currency' => '946', // RON currency code
    'description' => 'Order #ORDER123',
    'email' => 'customer@example.com',
    'customerDetails' => [
        'email' => 'customer@example.com',
        'phone' => '40712345678',
        'billingInfo' => [
            'country' => 'RO',
            'city' => 'Bucharest',
            'postAddress' => '123 Main St',
        ],
    ],
]);

if ($response && isset($response['formUrl'], $response['orderId'])) {
// IMPORTANT: You **must** save the 'orderId' returned by the gateway
    // in your local database associated with your order.
    // This 'orderId' is required later to query the payment status via getOrderStatus().
    $order->transaction_id = $response['orderId'];
    $order->save();

    // The 'formUrl' contains the payment link where the customer should be redirected
    // to complete the transaction using their card.
    echo "Redirect user to payment form: " . $response['formUrl'];
} else {
    echo "Payment initialization failed.";
}
```

Currency Format
---------------

[](#currency-format)

- The `amount` you send when initializing a payment should be in decimal format (e.g., `100.00` for one hundred RON).
- However, the amount in the response from the gateway (e.g., in `getOrderStatus`) is represented in minor units (e.g., `100` means 1.00 RON, where 1 RON = 100 bani).

### Retrieving Payment Status

[](#retrieving-payment-status)

After the customer completes (or fails to complete) the payment, ING will redirect them to your `return_url`. In that return handler, you can retrieve the payment status using the `getOrderStatus` method and take action accordingly.

Here's an example how to use `getOrderStatus`:

```
use Unquam\IngWebPaySdk\IngWebPayGateway;

// Retrieve payment status from ING using stored orderId
$gateway = new IngWebPayGateway();

$status = $gateway->getOrderStatus($orderId);
```

Payment Status Response Structure
---------------------------------

[](#payment-status-response-structure)

When calling `getOrderStatus($orderId)`, the SDK returns an associative array with detailed information about the transaction.

### Example Response:

[](#example-response)

```
[
    "errorCode" => "0", // "0" means success
    "errorMessage" => "Success",
    "orderNumber" => "55701045", // Internal gateway order number
    "orderStatus" => 2, // See status codes below
    "actionCode" => 0,
    "actionCodeDescription" => "Request processed successfully",
    "amount" => 100, // Amount in minor units (e.g., "100" means 1.00 RON)
    "currency" => "946", // ISO 4217 numeric code for RON
    "date" => 1752261834463, // Order creation timestamp (milliseconds)
    "paymentDate" => 1752261857681, // Payment confirmation timestamp (milliseconds)
    "orderDescription" => "Comanda nr. EP4MN8KX",
    "ip" => "127.0.0.1", // IP address of the customer
    "merchantOrderParams" => [ ... ],
    "attributes" => [ ... ],
    "cardAuthInfo" => [
        "expiration" => "1226",
        "cardholderName" => "CARDHOLDER",
        "pan" => "411111****1111",
        "approvalCode" => "AB1234",
    ],
    "orderBundle" => [ ... ],
    "reconciliationId" => "6d36d96b50814f62ae8e"
]
```

Order Status Codes
------------------

[](#order-status-codes)

The following table describes possible `orderStatus` values returned by `getOrderStatus()`:

CodeDescription (RO)Description (EN)`0`Comanda înregistrată, dar neplătităOrder registered, but not yet paid`1`Plată preautorizată (pentru tranzacții în 2 pași)Pre-authorized payment (for 2-step transactions)`2`Tranzacție autorizatăPayment authorized (successful)`3`Tranzacție anulatăTransaction canceled`4`Tranzacție reversatăTransaction refunded`5`Tranzacție inițiată prin sistemul ACS al băncii emitenteTransaction initiated via the issuer bank's ACS`6`Tranzacție respinsăTransaction failedTest Card Details
-----------------

[](#test-card-details)

You can use the following test card details when running in test mode (`ING_TEST_INDICATOR=1`).
These cards are **only valid in the test environment** provided by ING WebPay.

FieldValueCard Number`4662861119116040`Expiration DateAny future date (e.g. `05/29`)CVV`203`Cardholder NameAny name (e.g. `ING VISA`)> ⚠️ Make sure you're using the **UAT endpoint**:
> `https://securepay-uat.ing.ro/mpi_uat/rest/register.do`
> by setting `ING_TEST_INDICATOR=1` in your `.env` file.

License
-------

[](#license)

> **Disclaimer:** This software is provided "as is" without any warranty.
> The authors are not responsible for any damages or losses arising from its use.

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

💼 Commercial Support &amp; Development
--------------------------------------

[](#-commercial-support--development)

This SDK is actively maintained and ready to grow.

If you're using ING WebPay in your PHP/Laravel project and want:

- 🔧 **Help with integration** into your application
- 📈 **Custom features or business-specific extensions**
- 🛠️ **Ongoing maintenance, support or updates**
- 🤝 **Private commercial collaboration**

Feel free to [open an issue](https://github.com/Unquam/ing-web-pay-sdk/issues)
or contact us directly at ****

We’re open to partnerships and happy to evolve this SDK to better fit real-world use cases.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance56

Moderate activity, may be stable

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity45

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

305d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/75bd1298c764b1d07d458af99b7b7536990c8e00a551868e29e4873cbf7d779f?d=identicon)[Unquam](/maintainers/Unquam)

---

Top Contributors

[![Unquam](https://avatars.githubusercontent.com/u/20899562?v=4)](https://github.com/Unquam "Unquam (1 commits)")

---

Tags

phpapilaravelsdkpaymentsecure paymentsgateway integration

### Embed Badge

![Health badge](/badges/unquam-ing-web-pay-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/unquam-ing-web-pay-sdk/health.svg)](https://phpackages.com/packages/unquam-ing-web-pay-sdk)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[checkout/checkout-sdk-php

Checkout.com SDK for PHP

553.3M7](/packages/checkout-checkout-sdk-php)[mozex/anthropic-laravel

Anthropic PHP for Laravel is a supercharged PHP API client that allows you to interact with the Anthropic API

71226.4k1](/packages/mozex-anthropic-laravel)[postfinancecheckout/sdk

PostFinance Checkout SDK for PHP

22219.1k14](/packages/postfinancecheckout-sdk)[wallee/sdk

wallee SDK for PHP

12354.2k11](/packages/wallee-sdk)

PHPackages © 2026

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