PHPackages                             paynamics/paygate-sdk-php - 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. paynamics/paygate-sdk-php

Abandoned → [coreproc/paynamics-sdk](/?search=coreproc%2Fpaynamics-sdk)Library

paynamics/paygate-sdk-php
=========================

v1.0.0(4y ago)21496[2 issues](https://github.com/CoreProc/paygate-php-sdk/issues)MITPHPPHP &gt;=7.0

Since May 24Pushed 3y ago4 watchersCompare

[ Source](https://github.com/CoreProc/paygate-php-sdk)[ Packagist](https://packagist.org/packages/paynamics/paygate-sdk-php)[ RSS](/packages/paynamics-paygate-sdk-php/feed)WikiDiscussions master Synced today

READMEChangelog (2)DependenciesVersions (5)Used By (0)

Paynamics PayGate SDK PHP
=========================

[](#paynamics-paygate-sdk-php)

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

[](#installation)

---

`composer require CoreProc/paynamics-sdk-laravel`

`php artisan vendor:publish --provider="Coreproc\PaynamicsSdk\Provid ers\ServiceProvider"`

Usage
-----

[](#usage)

---

### Environment Variable

[](#environment-variable)

```
PAYNAMICS_MERCHANT_ID=
PAYNAMICS_MERCHANT_KEY=
PAYNAMICS_ENVIRONMENT=

PAYNAMICS_SANDBOX_ENDPOINT=
PAYNAMICS_PRODUCTION_ENDPOINT=

HSBC_MERCHANT_ID=
HSBC_MERCHANT_NAME=
HSBC_MERCHANT_KEY=
```

### Generating your payment request

[](#generating-your-payment-request)

```
use Coreproc\PaynamicsSdk\Requests\PaymentRequest;
use Coreproc\PaynamicsSdk\Requests\ItemRequest;

$itemRequest = ItemRequest::make()
            ->setItemName()
            ->setAmount()
            ->setQuantity();

$paymentRequest = PaymentRequest::make()
            ->setIpAddress()
            ->setNotificationUrl()
            ->setResponseUrl()
            ->setCancelUrl()
            ->setFname()
            ->setLname()
            ->setAddress1()
            ->setCity()
            ->setState()
            ->setEmail()
            ->setMobile()
            ->setClientIp()
            ->setAmount()
            ->setCurrency()
            ->setTrxtype('sale')
            ->setPmethod()
            ->setCountry()
            ->addItem($itemRequest);
```

You can add multiple items on the payment request. Total amount should be equal to the total of all items added in the request.

### Adding discount

[](#adding-discount)

You can add discount to the request by simply adding new item to the request with a negative value. **Note:** the total value of request must be equal to the total value of items added including the discount.

Example

```
/** Item name can be anything you want for exmaple ('Coupon Discount') or etc**/
$itemRequest = ItemRequest::make()
            ->setItemName('Discount')
            ->setAmount(-5000)
            ->setQuantity(1);

$paymentRequest->addItem($itemRequest);
```

### Generating paynamics form request

[](#generating-paynamics-form-request)

```
use Coreproc\PaynamicsSdk\Services\PaynamicsServiceManager;

/** Currently supports "payment" request only */
$paymentService = PaynamicsServiceManager::make('payment');

return $paymentService->setPaymentType('default')
    ->setRequest($paymentRequest)
    ->generate();
```

This will generate a signed html form base on the payment details you provide on `PaymentRequest`

Payment Types

- **hsbc** - Set payment type to "hsbc" if you payment method is "bpiinstall" or "hsbcinstall"
- **default** - All Payment method except "bpiinstall" and "hsbcinstall"

### Generating Payment request using installment

[](#generating-payment-request-using-installment)

When using installment like "bpiinstall" and "hsbcinstall", you should set the MetaData2 and Secure3d in your `PaymentRequest` and instead of passing country name on -&gt;setCountry() you should pass the country ISO code.

Example

```
$paymentRequest->setMetaData2()
    ->setSecure3d('try3d')
    ->setCountry('PH')
```

**Metadata2 Modes**

“1” - Absolute 0%

“2” – Regular Installment

“3” – Buy Now Pay Later, Absolute 0%

“4” - Buy Now Pay Later, Regular Installment

“5” – Reduce Interest Installment Promo

**For HSBC**, mode is 1. **For BPI**, on test env, available mode is 2

Credits
-------

[](#credits)

---

- [Owen Banan](https://github.com/owenbanan-cp)
- [All Contributors](../../contributors)

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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 ~772 days

Total

3

Last Release

1728d ago

Major Versions

v0.1.0 → v1.0.02021-08-11

PHP version history (2 changes)v0.1.0PHP &gt;=5.3

v1.0.0PHP &gt;=7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/6aebd8eea1d3e9a8d2c2483ea38416cece41aba5c9332e633182072137d01f4c?d=identicon)[chrisbjr](/maintainers/chrisbjr)

---

Top Contributors

[![jbergonia](https://avatars.githubusercontent.com/u/39474308?v=4)](https://github.com/jbergonia "jbergonia (39 commits)")[![owenbanan-cp](https://avatars.githubusercontent.com/u/70565582?v=4)](https://github.com/owenbanan-cp "owenbanan-cp (20 commits)")[![johnlemuelhapa-cp](https://avatars.githubusercontent.com/u/67457135?v=4)](https://github.com/johnlemuelhapa-cp "johnlemuelhapa-cp (13 commits)")[![chrisbjr](https://avatars.githubusercontent.com/u/571279?v=4)](https://github.com/chrisbjr "chrisbjr (3 commits)")[![jimuelpalaca](https://avatars.githubusercontent.com/u/28491049?v=4)](https://github.com/jimuelpalaca "jimuelpalaca (1 commits)")[![awkwardusername](https://avatars.githubusercontent.com/u/2331465?v=4)](https://github.com/awkwardusername "awkwardusername (1 commits)")[![jusdeleon](https://avatars.githubusercontent.com/u/8758708?v=4)](https://github.com/jusdeleon "jusdeleon (1 commits)")

### Embed Badge

![Health badge](/badges/paynamics-paygate-sdk-php/health.svg)

```
[![Health](https://phpackages.com/badges/paynamics-paygate-sdk-php/health.svg)](https://phpackages.com/packages/paynamics-paygate-sdk-php)
```

PHPackages © 2026

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