PHPackages                             dotlines-io/epw - 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. dotlines-io/epw

ActiveLibrary

dotlines-io/epw
===============

This package can be used for OnDemand Payment integration with Ghoori Platform.

00PHP

Since Sep 27Pushed 4y ago1 watchersCompare

[ Source](https://github.com/dotlines-io/epw)[ Packagist](https://packagist.org/packages/dotlines-io/epw)[ RSS](/packages/dotlines-io-epw/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

EPW Package
===========

[](#epw-package)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a1bd4fb461161f748389d27b2e5baa201a358e3e9a2e58814113e426af8cd902/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f646f746c696e65732d696f2f67686f6f72692d6f6e64656d616e642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dotlines-io/ghoori-ondemand)[![GitHub Tests Action Status](https://camo.githubusercontent.com/f80d52db3b8fd8eea706e09fd2573fac929bcd15a28fc47c2c9a0d09c04e5670/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f646f746c696e65732d696f2f67686f6f72692d6f6e64656d616e642f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/dotlines-io/ghoori-ondemand/actions?query=workflow%3ATests+branch%3Amaster)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/7bae39cb3cc20f9cc02a9f63f8ccb81609f061b3ee57f97f84c1d950f3dc10a9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f646f746c696e65732d696f2f67686f6f72692d6f6e64656d616e642f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/dotlines-io/ghoori-ondemand/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amaster)[![Total Downloads](https://camo.githubusercontent.com/fc0ac555b922de7705ae4930b5966f81ab6a961c7343c24b4eeeae44cf7bca96/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f646f746c696e65732d696f2f67686f6f72692d6f6e64656d616e642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dotlines-io/ghoori-ondemand)

---

This composer package can be used for EPW payment integration

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

[](#installation)

You can install the package via composer:

```
composer require dotlines-io/epw
```

Usage
-----

[](#usage)

```
/**
 * ******************************************************
 * ******************* Charge Request *******************
 * ******************************************************
 */
$tran_id = 'rtreg'; //must be unique for each request
$success_url = 'success_url'; //URL to which the customer will be returned when the payment is made successfully.
$fail_url = 'fail_url'; //URL to which the customer will be returned when the payment is made. But the Payment not Accepted by bank or card have insufficient balance etc
$cancel_url = 'cancel_url'; //URL to which the customer will be returned if the payment process is cancelled. If this field is not filled, the gateway window will simply close automatically upon clicking the cancellation button, so the customer will be returned to the last page on the Merchant's website where the customer has been before.

$ipn_url = ''; //Optional URL which easypayway will push the transaction details. Its required to confirm both party payment information updated to both party
$opt_a = ''; //Optional Field for Merchant Record
$opt_b = ''; //Optional Field for Merchant Record
$opt_c = ''; //Optional Field for Merchant Record
$opt_d = ''; //Optional Field for Merchant Record

// payment details
$amount = 39; // The total amount payable. Please note that you should skip the trailing zeroes in case the amount is a natural number
$payment_type = 'VISA'; //Optional Payment process card type that customer want to pay with
$currency = 'BDT'; //3­letter code of the currency of the amount according to ISO 4217 (see Annex I for accepted currencies)
$amount_vat = ''; //Optional
$amount_vatRatio = ''; //Optional
$amount_tax = ''; //Optional
$amount_taxRatio = ''; //Optional
$amount_processingfee = ''; //Optional
$amount_processingfee_ratio = ''; //Optional
$desc = 'T­Shirt'; //Merchant may specify a detailed calculation for the total amount payable. Please note that easypayway does check the validity of these data ­ they are only displayed in the ’More information’ section in the Merchant Panel of the gateway.

// Customer Details
$cus_name = 'Mr. ABc'; //Customer Full Name
$cus_email = 'abc@gmail.com'; //Email address of the customer who is making the payment.
$cus_add1 = 'Dhaka'; //cus_add1
$cus_add2 = ''; //Optional Customer’s address (e.g. town)
$cus_city = 'Dhaka'; //Customer’s city
$cus_state = 'Dhaka'; //Customer’s state or region.
$cus_postcode = '1206'; //Customer’s postal code/ZIP Code. Only alphanumeric values are accepted (no punctuation marks etc.)
$cus_country = 'Bangladesh'; //Customer’s country
$cus_phone = '01738084575'; //Customer’s phone number. Only numeric values are accepted
$cus_fax = ''; //Optional

// Shipping Details (If Ship to Same Address of Customer then No need to Fill Up)
$ship_name = ''; //Optional
$ship_add1 = ''; //Optional
$ship_add2 = ''; //Optional
$ship_city = ''; //Optional
$ship_state = ''; //Optional
$ship_postcode = ''; //Optional
$ship_country = ''; //Optional

$chargeRequest = \Dotlines\EPW\ChargeRequest::getInstance($tran_id, $success_url, $fail_url, $cancel_url, $amount, $currency, $desc, $cus_name, $cus_email, $cus_add1, $cus_city, $cus_state, $cus_postcode, $cus_country, $cus_phone, $ipn_url, $opt_a, $opt_b, $opt_c, $opt_d, $payment_type, $amount_vat, $amount_vatRatio, $amount_tax, $amount_taxRatio, $amount_processingfee, $amount_processingfee_ratio, $cus_add2, $cus_fax, $ship_name, $ship_add1, $ship_add2, $ship_city, $ship_state, $ship_postcode, $ship_country);
echo json_encode($chargeRequest->send()) . '';

/**
 * Success Charge Request Response looks like below.
 * You must redirect the user to the following url for payment.
 *["https:\/\/sandbox.easypayway.com\/payment\/paynow.php?track=EPW1621853905452832"]
 */

/**
 * ******************************************************
 * ******************* Status Request *******************
 * ******************************************************
 */
$statusUrl = 'https:///api/v2.0/status';
$spTransID = '';
$statusRequest = \Dotlines\EPW\StatusRequest::getInstance($request_id​);
echo json_encode($statusRequest->send()) . '';

/**
 * Status Request Response looks like below:
 * {
 *  "processingStatus": "CHARGED",
 *  "status": "DONE",
 *  "amount": "10.00",
 *  "errorCode": "00",
 *  "errorMessage": "Operation Successful",
 *  "bKashTransID": "6JS7L72YMV",
 *  "reference": "reference not provided"
 * }
 * Fail response only contains errorCode & errorMessage
 */
```

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/59867500f5299217fec76ab7e0b813ffcb1e63a4b197ba8f41dd49b2d4df48c3?d=identicon)[TareqMahbub](/maintainers/TareqMahbub)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/dotlines-io-epw/health.svg)

```
[![Health](https://phpackages.com/badges/dotlines-io-epw/health.svg)](https://phpackages.com/packages/dotlines-io-epw)
```

PHPackages © 2026

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