PHPackages                             datingvip/payon-xml-api - 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. datingvip/payon-xml-api

AbandonedArchivedLibrary[API Development](/categories/api)

datingvip/payon-xml-api
=======================

PHP Api library for PayOn XML api

v1.0.3(7y ago)21.4kLGPL-3.0-or-laterPHPPHP &gt;=5.0.0

Since Sep 22Pushed 2y ago8 watchersCompare

[ Source](https://github.com/DatingVIP/payon-xml-api)[ Packagist](https://packagist.org/packages/datingvip/payon-xml-api)[ Docs](https://github.com/DatingVIP/payon-xml-api)[ RSS](/packages/datingvip-payon-xml-api/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (3)Dependencies (1)Versions (5)Used By (0)

Payon Xml Api PHP Class
=======================

[](#payon-xml-api-php-class)

This is a simple unofficial PayOn XML API client implementation in PHP. These classes will make easier to execute API commands on PayOn server and Query data from it.

Usage Examples
==============

[](#usage-examples)

*User Registration Example*

```
require_once 'vendor/autoload.php';

use DatingVIP\Payment\PayOn\TransactionParams;
use DatingVIP\Payment\PayOn\QueryParams;
use DatingVIP\Payment\PayOn\XmlApi;

// config - replace to your values

$config = [
    'sender'   => 'PAYON_SERVER_ID',
    'channel'  => 'PAYON_CHANNEL',
    'userid'   => 'PAYON_USER_ID',
    'password' => 'PAYON_PASSWORD'
];

// init api class
$po_api = new XmlApi(
                   $config['sender'],
                   $config['channel'],
                   $config['userid'],
                   $config['password'],
                   true );

// init and build transaction params
$po_req = new TransactionParams();

// register user for CC payment

$po_req->setAccountNumber('4111111111111111');
$po_req->setAccountExpYear('2015');
$po_req->setAccountExpMonth('12');
$po_req->setAccountHolder('John Smith');
$po_req->setAccountVerif('123');

$po_req->setCustNameFamily('Smith');
$po_req->setCustNameGiven('John');
$po_req->setCustAddrZip('12345');
$po_req->setCustAddrStreet('Main Street');
$po_req->setCustAddrCountry('US');
$po_req->setCustAddrCity('New York');

$po_req->setCustAddrState('New York');
$po_req->setCustContIp($_SERVER['REMOTE_ADDR']);
$po_req->setCustContEmail('customer@example.com');

$po_req->setAccountBrand('VISA');

$po_req->setPaymentMethod('CC.RG');

// execute request

$res = $po_api->executeTransaction($po_req);

if (empty($res)) // probably curl/communication error
{
    die('Communication error!');
}

if (!$po_api->wasTranSuccessful()) // unsuccessful reginstration
{
    $response = $po_api->getTranResponseData();
    die('ERROR: ' . $response['return_code'] . ' : ' . $response['return_msg']);
}

// display
displayReqResp($po_api, 'Registration');
```

*Charge registered user*

```
// get registration UID for future use

$reg_uid = $po_api->getTranResponseData('unique_id');

// build params for charging the account

$po_req = new TransactionParams();

$po_req->setPaymentAmount('1.23');
$po_req->setPaymentCurrency('USD');

$po_req->setPaymentUsage('INV-TEST-' . time());
$po_req->setShopperId('CUST-' . time());
$po_req->setInvoiceId('INV-TEST-' . time());
$po_req->setPaymentMethod('CC.DB');
$po_req->setAccountRegId($reg_uid);
$po_req->setRecurrenceMode(Xml_Api::RECURRENCE_INIT);

// charge it
$res = $po_api->executeTransaction($po_req);

if (empty($res)) // probably curl/communication error
{
    die('Communication error!');
}

if (!$po_api->wasTranSuccessful()) // unsuccessful registration
{
    $response = $po_api->getTranResponseData();
    die('ERROR: ' . $response['return_code'] . ' : ' . $response['return_msg']);
}

// display
displayReqResp($po_api, 'Initial Charge');
```

*How to query data*

```
// Query example

$query_params = new QueryParams(
                                QueryParams::LEVEL_CHANNEL,
                                $config['channel'],
                                QueryParams::TYPE_STANDARD );

$query_params->setTypes(array('DB', 'RG'));

$from   = date('Y-m-d', strtotime('-1 days', time()));
$to     = date('Y-m-d',  time());

$query_params->setPeriodFrom($from);
$query_params->setPeriodTo($to);

$po_api->executeQuery( $query_params );

$result = $po_api->getResponse();

// display

displayReqResp($po_api, 'Query Results');
```

*Just a helper function to show data in browser*

```
// helper function

function displayReqResp(XmlApi $xml_api, $title = '')
{
    echo empty($title) ? '' : $title . '';
    echo 'REQUEST:';
    echo htmlentities($xml_api->getRequest());
    echo '';
    echo 'RESPONSE:';
    echo htmlentities($xml_api->getResponse());
    echo '';
}
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~528 days

Total

4

Last Release

2667d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b3d0432439843a2a063fec06efcf774d2193469dd51d72cfbb6457f6301004cf?d=identicon)[kornrunner](/maintainers/kornrunner)

![](https://www.gravatar.com/avatar/ea80daa8dcf047d5704d758fbf2693a48140bbbc9255341d70d65aa3695b7c60?d=identicon)[bboldi](/maintainers/bboldi)

![](https://www.gravatar.com/avatar/d01d1c9db54edd7dc7b7e1a534a3396e9818a7aef3fd9cf695da401f2727af8f?d=identicon)[dinke](/maintainers/dinke)

---

Top Contributors

[![bboldi](https://avatars.githubusercontent.com/u/839347?v=4)](https://github.com/bboldi "bboldi (6 commits)")[![kornrunner](https://avatars.githubusercontent.com/u/725986?v=4)](https://github.com/kornrunner "kornrunner (5 commits)")[![prymas007](https://avatars.githubusercontent.com/u/1726010?v=4)](https://github.com/prymas007 "prymas007 (3 commits)")[![dinke](https://avatars.githubusercontent.com/u/1319686?v=4)](https://github.com/dinke "dinke (1 commits)")[![pmiroslawski](https://avatars.githubusercontent.com/u/2961647?v=4)](https://github.com/pmiroslawski "pmiroslawski (1 commits)")

---

Tags

payonpayon-xml-apiapipaymentpayon

### Embed Badge

![Health badge](/badges/datingvip-payon-xml-api/health.svg)

```
[![Health](https://phpackages.com/badges/datingvip-payon-xml-api/health.svg)](https://phpackages.com/packages/datingvip-payon-xml-api)
```

###  Alternatives

[everypay/everypay-php

1742.0k](/packages/everypay-everypay-php)

PHPackages © 2026

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