PHPackages                             hshafiei374/bitrah - 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. hshafiei374/bitrah

ActiveLibrary[Payment Processing](/categories/payments)

hshafiei374/bitrah
==================

bitrah gateway

1.1.0(5y ago)28MITPHPPHP ^7.1.3|7.2.\*|7.3.\*|7.4.\*CI failing

Since Aug 22Pushed 5y ago1 watchersCompare

[ Source](https://github.com/zhitoo/bitrah)[ Packagist](https://packagist.org/packages/hshafiei374/bitrah)[ Docs](https://github.com/hshafiei374/bitrah)[ RSS](/packages/hshafiei374-bitrah/feed)WikiDiscussions master Synced 3w ago

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

 [![](./images/logo.svg)](./images/logo.svg)

Bitrah Gateway Laravel Package
==============================

[](#bitrah-gateway-laravel-package)

Package for bitrah gateway
--------------------------

[](#package-for-bitrah-gateway)

[![License: MIT](https://camo.githubusercontent.com/1a2e0606685ce00663bf829868f794fd3fc9c86f8d80cae324734129e0723a58/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d627269676874677265656e2e737667)](https://opensource.org/licenses/MIT)

Bitrah is a [Laravel](http://laravel.com/) package that helping Laravel developers implement [Bitrah](http://bitrah.ir/) gateway .

- [Features](#features)
- [Getting Started](#getting-started)
- [Code](#code)
- [Documentation](#documentation)
- [Changelog](#changelog)
- [License](#license)

---

Features
--------

[](#features)

- بسیار ساده و قدرتمند

Getting Started
---------------

[](#getting-started)

پکیج را با دستور زیر نصب میکنیم

```
composer require hshafiei374/bitrah

```

اگر ورژن لاراول شما کمتر از 5.4 است باید وب هوک و کال بک را در آرایه ی $except در کلاس VerifyCsrfToken قرار دهید.

Code
----

[](#code)

بااستفاده از کد زیر یک درخواست به بیتراه میفرستیم

```
$result = Bitrah::submitRequest(orderId '1',rialValue '270000000', callbackurl 'http://your-domain.com/bitrah_call_back', webhookkurl 'http://your-domain.com/bitrah_webhook');
/*
$result is :
[
'data'=>[
        'token'=>'0d0cd5a0445647asdasdcff2c48ad69e7',
        'redirectUrl'=>https://www.bitrah.ir/en/BitrahTestAccount?token=0d0cd5a044564783asc48ad69e7&mode=off&coin=BTC&amount=25000'',
        'multiCoinRedirectUrl'=>'https://www.bitrah.ir/en/BitrahTestAccount?token=0d0cd5asdcccff2c48ad69e7&mode=on&coin=BTC&amount=25000',
        'refId'=>'2547'
    ],
'message'=>'Successfully done!',
'timesatmp'=>'2020-11-14T06:56:43.646+0000',
'success'=>'true'
];
*/
```

شما باید اطلاعات گرفته شده از بیتراه را در دیتا بیس خود ذخیره کنید و چک کنید اگر قبلا refId و token در دیتا بیس شما وجود نداشته باشد.

سپس باید کاربر را به url دریافتی از بیتراه هدایت کنید.

کاربر وارد صفحه پرداخت بیتراه می شود

[![Code](./images/bitrah1.jpeg)](./images/bitrah1.jpeg)

بعد از پرداخت کاربر به لینک کالبک سایت شما باز می گردد. در این مرحله شما باید چک کنید که این درخواست قبلا پردازش نشده باشد.

در نهایت بعد از تایید پرداخت وب هوک شما توسط بیتراه صدا زده می شود.

شما همچنین می توانید با استفاده از متد زیر در هر زمانی وضعیت تراکنش خود را با استفاده از refId مشخص کنید

```
$result = Bitrah::getTransactionStatus($refId);
/*
$result is:
array:4 [▼
  "data" => array:5 [▼
    "status" => 2
    "orderId" => "1"
    "refId" => "4805"
    "coin" => "TRX"
    "value" => "3.293901000"
  ]
  "message" => "Successfully done!"
  "timestamp" => "2020-11-22T07:16:15.936+0000"
  "success" => true
]
*/
```

Documentation
-------------

[](#documentation)

[documentation](https://www.bitrah.ir/en/doc).

Changelog
---------

[](#changelog)

v1.0.0
------

[](#v100)

- پیاده سازی درخواست

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 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

Every ~91 days

Total

2

Last Release

2050d ago

### Community

Maintainers

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

---

Top Contributors

[![zhitoo](https://avatars.githubusercontent.com/u/20835893?v=4)](https://github.com/zhitoo "zhitoo (21 commits)")

---

Tags

phplaravellaravel5-packagelaravel-gatewaybitrahbitrah-gateway

### Embed Badge

![Health badge](/badges/hshafiei374-bitrah/health.svg)

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

###  Alternatives

[unopim/unopim

UnoPim Laravel PIM

10.5k2.4k](/packages/unopim-unopim)[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

3417.0k](/packages/duncanmcclean-statamic-cargo)[api-platform/laravel

API Platform support for Laravel

58171.6k14](/packages/api-platform-laravel)[helori/laravel-saas

Software as a Service scaffholding for Laravel based on Vue 3, Tailwindcss and Stripe. Inspired by Laravel Jetstream and Spark.

121.4k](/packages/helori-laravel-saas)

PHPackages © 2026

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