PHPackages                             limely/pingyo - 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. limely/pingyo

ActiveLibrary

limely/pingyo
=============

v1.1(10y ago)015BSDPHPPHP &gt;=5.3.2

Since Jun 15Pushed 7y ago1 watchersCompare

[ Source](https://github.com/Limely/pingyo)[ Packagist](https://packagist.org/packages/limely/pingyo)[ Docs](https://github.com/papersky/pingyo)[ RSS](/packages/limely-pingyo/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (4)Versions (3)Used By (0)

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

[](#installation)

Application uses [Composer](http://getcomposer.org) to install and update:

```
curl -s http://getcomposer.org/installer | php
php composer.phar require limely/pingyo:1.*

```

Usage
-----

[](#usage)

Enum fields will be converted to integer automatically. Dates will be converted to JS Date objects automatically.

Step 1. Create Source Details object

```
$source_details = new PingYo\SourceDetails();
$source_details->address = 'asd';
$source_details->clientuseragent = 'asd';
$source_details->creationurl = 'http://www.url.com';
```

Step 2. Create Application Details object

```
$application_details = new PingYo\ApplicationDetails();

$application_details->title = TitleTypes::MR;
$application_details->firstname = "John";
$application_details->lastname = "Smith";
$application_details->dateofbirth = "1994-09-01";
$application_details->email = "johnsmith@domain.com";
$application_details->homephonenumber = "+12345678900";
$application_details->mobilephonenumber = "07123456789";
$application_details->workphonenumber = "+12345678900";

$application_details->employername = "Test Corp";
$application_details->jobtitle = "Construction Worker";
$application_details->employmentstarted = "2014-09-01";
$application_details->employerindustry = PingYo\EmployerIndustryTypes::ConstructionManufacturing;
$application_details->incomesource = PingYo\IncomeSourceTypes::EmployedFullTime;
$application_details->payfrequency = PingYo\PayFrequencyTypes::LastWorkingDayMonth;
$application_details->payamount = 100;
$application_details->incomepaymenttype = PingYo\IncomePaymentTypes::RegionalDirectDeposit;
$application_details->nextpaydate = "2014-10-01";
$application_details->followingpaydate = "2014-10-10";
$application_details->loanamount = 10000;
$application_details->nationalidentitynumber = null;
$application_details->nationalidentitynumbertype = PingYo\NationalIdentityNumberTypes::NationalInsurance;
$application_details->consenttocreditsearch = true;
$application_details->consenttomarketingemails = true;
$application_details->residentialstatus = PingYo\ResidentialStatusTypes::HomeOwner;

$application_details->housenumber = "122";
$application_details->housename = null;
$application_details->addressstreet1 = "Test Street";
$application_details->addresscity = "Test City";
$application_details->addresscountrycode = "GB";
$application_details->addresscounty = "County Test";
$application_details->addressmovein = "2014-08-01";
$application_details->addresspostcode = "BT602EW";

$application_details->bankaccountnumber = "12345678";
$application_details->bankcardtype = PingYo\BankCardTypes::VisaDebit;
$application_details->bankroutingnumber = "123456";
$application_details->monthlymortgagerent = 600;
$application_details->monthlycreditcommitments = 100;
$application_details->otherexpenses = 250;
$application_details->minimumcommissionamount = 0;
$application_details->maximumcommissionamount = 0;
$application_details->applicationextensions = ["x"=>"hello","y"=>"world"];
```

Step 3. Create Application object and attach ApplicationDetails and SourceDetails objects

```
$application = new PingYo\Application();
$application->affiliateid = 'TEST';
$application->timeout = 120;
$application->testonly = true;
$application->setApplicationDetails($application_details);
$application->setSourceDetails($source_details);
```

Step 4. Validate

```
$validation_result = $application->validate();
if($validation_result)
{
	//prevalidation OK
	//next step
}
else
{
	var_dump($validation_result);
	//$validation_result contains validation problems
}
```

Step 5. Send Application

```
$application_status = $application->send();
if($application_status===false)
{
	//validation problems
	//step 4 missed?
}
else
{
	//next step
}
```

Step 6. Check Application Result

```
if($application_status->httpcode=202)
{
	//all fine, server validation passed
	//next step
}
else
{
	//check problems
	var_dump($application_status->errors);
	var_dump($application_status->message);
}
```

Step 7. Take Redirect Url. You can wait for result in loop or use async requests

```
while ($application_status->percentagecomplete!=100)
{
	$application_status->refresh();
	sleep(2);
}
$final_status = $application_status->status;
switch($final_status){
	case 'LenderMatchFound':
		$redirect_location = $application_status->redirectionurl;
	break;
	case 'Unknown':
		//some action
	break;
	case 'Resurrecting':
		//some action
	break;
	case 'Processing':
		//some action
	break;
	case 'LenderMatchFound':
		//some action
	break;
	case 'ConditionalLenderMatchFound':
		//some action
	break;
	case 'NoLenderMatchFound':
		//some action
	break;
	case 'Rejected':
		//some action
	break;
	case 'Withdrawn':
		//some action
	break;
	case 'Erred':
		//some action
	break;
}
```

Or Async method:

```
//get and save correlationid for async requests
$corrid = $application_status->correlationid;

//....
//async requests code
$application_status=PingYo\Status::CreateFromCorrelationId($corrid);
$application_status->refresh();
if($application_status->percentagecomplete==100)
{
	//action
}
else
{
	//do nothing, next request can take action
	//or read problems
	$status = $application_status->status;
	$problem = $application_status->message;
}
```

LOGGER SUPPORT
--------------

[](#logger-support)

Install Monolog Logger () or any other Psr3 logger

```
$logger = new Logger("PingYo");
$logger->pushHandler(new StreamHandler("pingyo.log"));

$application = new PingYo\Application();
$application->attachLogger($logger);

//...
//for async requests
$application_status=PingYo\Status::CreateFromCorrelationId($corrid,$logger);
```

RUNNING TESTS
-------------

[](#running-tests)

phpunit.phar --bootstrap tests/Bootstrap.php tests/PingYo/basictest

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

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

Total

2

Last Release

3987d ago

### Community

Maintainers

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

---

Tags

pingyo

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/limely-pingyo/health.svg)

```
[![Health](https://phpackages.com/badges/limely-pingyo/health.svg)](https://phpackages.com/packages/limely-pingyo)
```

###  Alternatives

[verbb/formie

The most user-friendly forms plugin for Craft.

101372.9k40](/packages/verbb-formie)[skeeks/cms

SkeekS CMS — control panel and tools based on php framework Yii2

13825.6k47](/packages/skeeks-cms)[bitrix24/b24phpsdk

An official PHP library for the Bitrix24 REST API

9230.2k4](/packages/bitrix24-b24phpsdk)[egroupware/egroupware

EGroupware extends a classic groupware with an integrated CRM-system, a secure file-server and Collabora Online Office.

2891.6k](/packages/egroupware-egroupware)[hipay/hipay-fullservice-sdk-magento2

The HiPay Fullservice module for Magento 2 is a PHP module which allows you to accept payments in your Magento 2 online store.

11195.3k1](/packages/hipay-hipay-fullservice-sdk-magento2)[oxid-solution-catalysts/paypal-module

OXID eSales PayPal payment module for OXID

2126.8k](/packages/oxid-solution-catalysts-paypal-module)

PHPackages © 2026

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