PHPackages                             mahdisarani/laravel-payping - 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. mahdisarani/laravel-payping

ActiveLibrary[Payment Processing](/categories/payments)

mahdisarani/laravel-payping
===========================

PayPing for Laravel 10

0131PHP

Since May 14Pushed 1y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

payping for laravel 10
======================

[](#payping-for-laravel-10)

درگاه پرداخت پی پینگ برای لاراول 10

payment and oauth2 request library for payping

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

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

### نصب

[](#نصب)

`composer require mahdisarani/laravel-payping`

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

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

```
$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 (Exception $e) {
    echo $e->getMessage();
}
```

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

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

```
$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

15

—

LowBetter than 3% of packages

Maintenance26

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity18

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.

### Community

Maintainers

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

---

Top Contributors

[![mahdisarani](https://avatars.githubusercontent.com/u/37251741?v=4)](https://github.com/mahdisarani "mahdisarani (10 commits)")

### Embed Badge

![Health badge](/badges/mahdisarani-laravel-payping/health.svg)

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

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

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