PHPackages                             soheylak/omnipay-saman - 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. soheylak/omnipay-saman

ActiveLibrary[Payment Processing](/categories/payments)

soheylak/omnipay-saman
======================

1.0.5(2y ago)15MITPHPPHP ^7.3

Since Dec 18Pushed 2y ago2 watchersCompare

[ Source](https://github.com/soheyla-karimzade/omnipay-saman)[ Packagist](https://packagist.org/packages/soheylak/omnipay-saman)[ RSS](/packages/soheylak-omnipay-saman/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (7)Versions (6)Used By (0)

Instalation
-----------

[](#instalation)

```
composer require soheylak/omnipay-saman

```

Example
-------

[](#example)

###### Purchase

[](#purchase)

#### The result will be a redirect to the gateway or bank.

[](#the-result-will-be-a-redirect-to-the-gateway-or-bank)

```
    $gateway->setTerminalId('xxxxxxxxxxxx');
    $gateway->setRedirectUrl('https://www.example.com/return');

    $response = $gateway->purchase([
        'Amount' => $amount,
        'currency' => $currency,
        'ResNum'=>'10',
        'CellNumber'=>'9120000000'
    ])->send();

    // Process response
    if ($response->isSuccessful() && $response->isRedirect()) {
        // store the transaction reference to use in completePurchase()
        $transactionReference = $response->getTransactionReference();
        // Redirect to offsite payment gateway
        $response->redirect();
    } else {
        // Payment failed: display message to customer
        echo $response->getMessage();
    }
```

### Complete Purchase (Verify)

[](#complete-purchase-verify)

```
// Send purchase complete request

    $response = $gateway->completePurchase([
        'RefNum' => $refNum,
        'TerminalNumber' => $terminalNumber,
    ])->send();

    if (!$response->isSuccessful() || $response->isCancelled()) {
        // Payment failed: display message to customer
        echo $response->getMessage();
    } else {
        // Payment was successful
        print_r($response);
    }
```

### Refund Order

[](#refund-order)

Refund an order by the $refNum:

```
    $response = $gateway->refund([
        'RefNum' => $refNum,
        'TerminalNumber' => $terminalNumber,
    ])->send();

    if ($response->isSuccessful()) {
        // Refund was successful
        print_r($response);
    } else {
        // Refund failed
        echo $response->getMessage();
    }
```

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

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

Total

4

Last Release

804d ago

PHP version history (2 changes)v1.0.0PHP ^8

v1.0.2PHP ^7.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/42b3c02f5062ebc778975e29193e8a8288accf976656bca41045433d6621f757?d=identicon)[soheyla-karimzade](/maintainers/soheyla-karimzade)

---

Top Contributors

[![soheyla-karimzade](https://avatars.githubusercontent.com/u/26362318?v=4)](https://github.com/soheyla-karimzade "soheyla-karimzade (7 commits)")

###  Code Quality

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/soheylak-omnipay-saman/health.svg)

```
[![Health](https://phpackages.com/badges/soheylak-omnipay-saman/health.svg)](https://phpackages.com/packages/soheylak-omnipay-saman)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M738](/packages/sylius-sylius)

PHPackages © 2026

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