PHPackages                             pipaypw/payroll - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. pipaypw/payroll

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

pipaypw/payroll
===============

PHP package to automate operation transactions on Pi Network

1.0.1(11mo ago)02PHP

Since May 30Pushed 11mo agoCompare

[ Source](https://github.com/Pipaypw/payroll)[ Packagist](https://packagist.org/packages/pipaypw/payroll)[ RSS](/packages/pipaypw-payroll/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

[![Build Status](https://github.com/laravel/framework/workflows/tests/badge.svg)](https://packagist.org/packages/pipaypw/payroll)[![Total Downloads](https://camo.githubusercontent.com/b0a7ee2f3f0208712ecb1081b9d6fcf05045c10cd6f345abcb924f5512c0d346/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c61726176656c2f6672616d65776f726b)](https://packagist.org/packages/pipaypw/payroll)

Payroll - Pi Network PHP server-side Service worker package
===========================================================

[](#payroll----pi-network-php-server-side-service-worker-package)

This is a Pi Network PHP package you can use to integrate the Pi Network sevice worker apps platform with a PHP backend application.

Install
-------

[](#install)

Install this package as a dependency of your app:

```
# With composer:
composer require pipaypw/payroll:dev-main

```

Example
-------

[](#example)

1. Initialize the SDK

```
require __DIR__ . '/vendor/autoload.php';
use Pipaypw\Payroll\SpenderBot;

// DO NOT expose these values to public
$apiKey = "YOUR_PI_API_KEY";
$walletPrivateSeed = "S_YOUR_WALLET_PRIVATE_SEED"; // starts with S
$network = "Pi Network";
$sw = new SpenderBot($apiKey, $walletPrivateSeed);
```

### Stream for payments and events

[](#stream-for-payments-and-events)

In this example we will listen for received payments for an account.

```
$sdk = $sw->getHorizonClient($network);

 // Create two accounts, so that we can send a payment.
$keypair1 = KeyPair::random();
$keypair2 = KeyPair::random();
$acc1Id = $keypair1->getAccountId();
$acc2Id = $keypair2->getAccountId();
FriendBot::fundTestAccount($acc1Id);
FriendBot::fundTestAccount($acc2Id);

// create a child process that listens to payment steam
$pid = pcntl_fork();

if ($pid == 0) {
    // Subscribe to listen for payments for account 2.
    // If we set the cursor to "now" it will not receive old events such as the create account operation.
    $sdk->payments()->forAccount($acc2Id)->cursor("now")->stream(function(OperationResponse $payment) {
        printf('Payment operation %s id %s' . PHP_EOL, get_class($payment), $payment->getOperationId());
        // exit as soon as our specific payment has been received
        if ($payment instanceof PaymentOperationResponse && floatval($payment->getAmount()) == 100.00) {
            exit(1);
        }
    });
}

// send the payment from account 1 to account 2
$acc1 = $sdk->requestAccount($acc1Id);
$paymentOperation = (new PaymentOperationBuilder($acc2Id, Asset::native(), "100"))->build();
$transaction = (new TransactionBuilder($acc1))->addOperation($paymentOperation)->build();
$transaction->sign($keypair1, Network::testnet());
$response = $sdk->submitTransaction($transaction);

// wait for child process to finish.
while (pcntl_waitpid(0, $status) != -1) {
    $status = pcntl_wexitstatus($status);
    echo "Completed with status: $status \n";
}
```

Overall flow for Payroll
------------------------

[](#overall-flow-for-payroll)

To create a SpenderBot payment using the Pi PHP SDK, here's an overall flow you need to follow:

> Intentionaly left blank

Apps
----

[](#apps)

- PIPAY Dapp [SmartContracts for Pi Network](https://pipay.pw).
- PIPAY WALLET [Wallet on Pi, Fast and instant payments](https://wallet.pipay.pw).

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance50

Moderate activity, may be stable

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

354d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/47987dbbb1eb31e35496fbcd2d3bf1b219ae06e4b794347e493e2b32bf8251cd?d=identicon)[kirana-ruby](/maintainers/kirana-ruby)

---

Top Contributors

[![kirana-ruby](https://avatars.githubusercontent.com/u/213338923?v=4)](https://github.com/kirana-ruby "kirana-ruby (6 commits)")

### Embed Badge

![Health badge](/badges/pipaypw-payroll/health.svg)

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

###  Alternatives

[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[dhlparcel/magento2-plugin

DHL Parcel plugin for Magento 2

11180.5k2](/packages/dhlparcel-magento2-plugin)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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