PHPackages                             hmdshariati/payping-client - 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. [Payment Processing](/categories/payments)
4. /
5. hmdshariati/payping-client

ActiveLibrary[Payment Processing](/categories/payments)

hmdshariati/payping-client
==========================

0.0.1(6y ago)012MITPHP

Since Jun 1Pushed 5y agoCompare

[ Source](https://github.com/hmdshariati/payping-php-client)[ Packagist](https://packagist.org/packages/hmdshariati/payping-client)[ RSS](/packages/hmdshariati-payping-client/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

payping-client
==============

[](#payping-client)

payment and oauth2 request library for payping

نحوه استفاده
------------

[](#نحوه-استفاده)

### نصب

[](#نصب)

`composer require flotfeali/payping-client`

### درخواست پرداخت

[](#درخواست-پرداخت)

```
$token = "توکن اختصاصی ";
$args = [
        "amount" => میلغ تراکنش,
    "payerIdentity" => "شناسه کاربر در صورت وجود",
    "payerName" => "نام کاربر پرداخت کننده",
    "description" => "توضیحات",
    "returnUrl" => "آدرس برگشتی از سمت درگاه",
    "clientRefId" => "شماره فاکتور"
];

$payment = new \PayPing\Payment($token);

try {
    $payment->pay($args);
} catch (Exception $e) {
    var_dump($e->getMessage());
}
//echo $payment->getPayUrl();

header('Location: ' . $payment->getPayUrl());
```

### تایید پرداخت

[](#تایید-پرداخت)

```
$token = "توکن اختصاصی";

$payment = new \PayPing\Payment($token);

try {
    if($payment->verify($_GET['refid'], 100)){
        echo "success";
    }else{
        echo "fail";
    }
}
catch (PayPingException $e) {
	foreach (json_decode($e->getMessage(), true) as $msg) {
		echo $msg;
	}
}
```

### بررسی ثبت نام کاربر بر اساس ایمیل

[](#بررسی-ثبت-نام-کاربر-بر-اساس-ایمیل)

```
$token = "توکن اختصاصی";

$register = new \PayPing\Register($token);

var_dump($register->checkEmail("ایمیل مورد نظر"));
```

### ثبت نام کاربر در پی پینگ

[](#ثبت-نام-کاربر-در-پی-پینگ)

```
$token = "توکن اختصاصی";

$register = new \PayPing\Register($token);

$params = [
    "UserName" => "نام کاربری",
    "Email" => "ایمیل - اجباری",
    "FirstName" => "نام کوچک",
    "LastName" => "نام خانوادگی",
    "PhoneNumber" => "شماره تلفن",
    "NationalCode" => "کد ملی",
    "BirthDay" => "تاریخ تولد",
    "Sheba" => "شناسه شبا"
];
try {
    $register_id = $register->registerUser("آدرس برگشتی هنگام تکمیل ثبت نام در پی پینگ", $params);
  header("Location: ".$register->getRegisterUrl());
}catch (Exception $e){
    echo $e->getMessage();
}
```

### ورود کاربران توسط oauth2

[](#ورود-کاربران-توسط-oauth2)

```
$client_id = "client-id";
$client_secret = "client-secret";
$codeVerify = 'یک  شناسه یکتا به ازای هر کاربر ';//generateVerified();
$callback = "آدرس برگشتی هنگام ورود در پی پینگ";
$scope = [ //دسترسی های مورد نیاز از پنل پی پینگ
   PayPing\Scopes::OPENID
   //, ...
];

$state = ["مقادیری که بعد از ثبت نام و برگشت نیاز دارید"];

try {
    $auth = new PayPing\Authorization($client_id, $client_secret, $callback, $codeVerify);
    echo 'login with payping' . "";
} catch (Exception $exception) {
    echo $exception->getMessage();
}
```

### تایید ورود در پنل پی پینگ

[](#تایید-ورود-در-پنل-پی-پینگ)

```
$client_id = "client-id";
$client_secret = "client-secret";
$codeVerify = 'یک  شناسه یکتا به ازای هر کاربر که در مرحله قبل ساخته شده است ';
$callback = "آدرس برگشتی هنگام ورود در پی پینگ";
$auth = new PayPing\Authorization($client_id,$client_secret,$callback,$codeVerify);
try {
	echo '';
    print_r($auth->getAccessToken($callback, $codeVerify));
} catch (Exception $exception) {
    echo $exception->getMessage();
}
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 61.9% 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

2534d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/84eb62a2993e5694109cae157e9212915fb429c5f328fe6ce795a0a074e1a3f7?d=identicon)[hmdshariati](/maintainers/hmdshariati)

---

Top Contributors

[![farhad-lotfeali](https://avatars.githubusercontent.com/u/8584058?v=4)](https://github.com/farhad-lotfeali "farhad-lotfeali (13 commits)")[![ashkanRmk](https://avatars.githubusercontent.com/u/19786593?v=4)](https://github.com/ashkanRmk "ashkanRmk (3 commits)")[![rivassh](https://avatars.githubusercontent.com/u/6438294?v=4)](https://github.com/rivassh "rivassh (3 commits)")[![vahidalvandi](https://avatars.githubusercontent.com/u/7871623?v=4)](https://github.com/vahidalvandi "vahidalvandi (2 commits)")

### Embed Badge

![Health badge](/badges/hmdshariati-payping-client/health.svg)

```
[![Health](https://phpackages.com/badges/hmdshariati-payping-client/health.svg)](https://phpackages.com/packages/hmdshariati-payping-client)
```

###  Alternatives

[chargebee/chargebee-php

ChargeBee API client implementation for PHP

768.0M9](/packages/chargebee-chargebee-php)[imdhemy/google-play-billing

Google Play Billing

491.3M5](/packages/imdhemy-google-play-billing)[bitpay/sdk

Complete version of the PHP library for the new cryptographically secure BitPay API

42337.5k4](/packages/bitpay-sdk)[buckaroo/sdk

Buckaroo payment SDK

12189.1k8](/packages/buckaroo-sdk)[contica/facturador-electronico-cr

Un facturador de código libre para integrar facturación electrónica en Costa Rica a un proyecto PHP

2128.8k](/packages/contica-facturador-electronico-cr)[karson/mpesa-php-sdk

172.2k](/packages/karson-mpesa-php-sdk)

PHPackages © 2026

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