Download the PHP package unquam/ing-web-pay-sdk without Composer
On this page you can find all versions of the php package unquam/ing-web-pay-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download unquam/ing-web-pay-sdk
More information about unquam/ing-web-pay-sdk
Files in unquam/ing-web-pay-sdk
Package ing-web-pay-sdk
Short Description Laravel SDK for ING Web Pay integration. Provides a clean and simple interface for initiating and handling payments through the ING Web Pay system.
License MIT
Informations about the package ing-web-pay-sdk
IngWebPay SDK for PHP
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
- 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
You can install the SDK via Composer:
SDK version: v1.0.0
If you're using this SDK as a Laravel package, publish the configuration file using Artisan:
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:
Configuration File Example (config/ing-web-pay.php)
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
| Key | Description | Example |
|---|---|---|
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)
Configure the following variables in your .env file to set up the SDK properly:
Example Usage
Here's a simple example demonstrating how to initialize a payment using the IngWebPayGateway:
Currency Format
- The
amountyou send when initializing a payment should be in decimal format (e.g.,100.00for one hundred RON). - However, the amount in the response from the gateway (e.g., in
getOrderStatus) is represented in minor units (e.g.,100means 1.00 RON, where 1 RON = 100 bani).
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:
Payment Status Response Structure
When calling getOrderStatus($orderId), the SDK returns an associative array with detailed information about the transaction.
Example Response:
Order Status Codes
The following table describes possible orderStatus values returned by getOrderStatus():
| Code | Description (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 emitente | Transaction initiated via the issuer bank's ACS |
6 |
Tranzacție respinsă | Transaction failed |
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.
| Field | Value |
|---|---|
| Card Number | 4662861119116040 |
| Expiration Date | Any future date (e.g. 05/29) |
| CVV | 203 |
| Cardholder Name | Any name (e.g. ING VISA) |
⚠️ Make sure you're using the UAT endpoint:
https://securepay-uat.ing.ro/mpi_uat/rest/register.do
by settingING_TEST_INDICATOR=1in your.envfile.
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 file for details.
💼 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
or contact us directly at [email protected]
We’re open to partnerships and happy to evolve this SDK to better fit real-world use cases.