PHPackages                             vedatunlu/payment - 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. vedatunlu/payment

ActiveLibrary[Payment Processing](/categories/payments)

vedatunlu/payment
=================

Payment systems api integration for Laravel

v1.4.6(2y ago)10570MITPHPPHP &gt;=8.0

Since May 26Pushed 2y ago1 watchersCompare

[ Source](https://github.com/vedatunlu/laravel-payment)[ Packagist](https://packagist.org/packages/vedatunlu/payment)[ Docs](https://github.com/vedatunlu/laravel-payment)[ RSS](/packages/vedatunlu-payment/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (3)Versions (8)Used By (0)

 [![](https://camo.githubusercontent.com/a8a310ea4a442c88385de96fbec37720c9fb63dc9d99df894151beb04ea6d2c7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7665646174756e6c752f7061796d656e74)](https://camo.githubusercontent.com/a8a310ea4a442c88385de96fbec37720c9fb63dc9d99df894151beb04ea6d2c7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7665646174756e6c752f7061796d656e74) [![](https://camo.githubusercontent.com/840083a4d5c12fdba02e127d0dcdad5b89e265a1196d8ab9d73a5045411c3f36/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f7665646174756e6c752f7061796d656e74)](https://camo.githubusercontent.com/840083a4d5c12fdba02e127d0dcdad5b89e265a1196d8ab9d73a5045411c3f36/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f7665646174756e6c752f7061796d656e74) [![](https://camo.githubusercontent.com/aa7a6513a28563938f3a1b483d2311df049649c8810055cde920409f15825291/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7265706f2d73697a652f7665646174756e6c752f6c61726176656c2d7061796d656e74)](https://camo.githubusercontent.com/aa7a6513a28563938f3a1b483d2311df049649c8810055cde920409f15825291/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7265706f2d73697a652f7665646174756e6c752f6c61726176656c2d7061796d656e74) [![](https://camo.githubusercontent.com/ec7d6bd503d6efee7c2b11e06ed9dc58a6d317bbc73807b75200240cc3cf7fe0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f7665646174756e6c752f6c61726176656c2d7061796d656e74)](https://camo.githubusercontent.com/ec7d6bd503d6efee7c2b11e06ed9dc58a6d317bbc73807b75200240cc3cf7fe0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f7665646174756e6c752f6c61726176656c2d7061796d656e74) [![](https://camo.githubusercontent.com/07fe47e421543787fa3b503822f55727819d8ca5a42889fadbd9680c4162ef74/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652d646174652f7665646174756e6c752f6c61726176656c2d7061796d656e74)](https://camo.githubusercontent.com/07fe47e421543787fa3b503822f55727819d8ca5a42889fadbd9680c4162ef74/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652d646174652f7665646174756e6c752f6c61726176656c2d7061796d656e74) [![](https://camo.githubusercontent.com/3ef3a60905856fc0db0e8019fad3d2d1e8cc4691d54cc38e42205735dfa9db15/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e63652d4d49542d677265656e)](https://camo.githubusercontent.com/3ef3a60905856fc0db0e8019fad3d2d1e8cc4691d54cc38e42205735dfa9db15/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e63652d4d49542d677265656e)

Laravel Payment
===============

[](#laravel-payment)

Laravel Payment is a package used for managing payment gateway integrations. This package provides an easy interface for integrating popular payment gateways such as Sipay (and soon Iyzico, Sipay, PayTr, iPara, Paynet etc.) into your Laravel application.

Features
--------

[](#features)

- Easy integration with various payment gateways
- Easy usage with Payment client class
- Wallet usage with available payment gateways
- Easy validation for hash keys within incoming error or success callback request, webhooks etc.
- Multiple usage with available gateways and its methods.

Installation
------------

[](#installation)

1. Use Composer to add the Laravel Payment package to your project:

```
    composer require vedatunlu/payment
```

2. Package service providers will be discovered by your laravel project automatically. So you don't need to update your app/config.php file to add package service provider.
3. Publish the config files to your project.

```
    php artisan vendor:publish --tag=payment-config
```

The command above will create a file named payment.php on config directory.

### Create environment variables on your .env file before usage

[](#create-environment-variables-on-your-env-file-before-usage)

Add your credentials provided by your payment gateway to the related payment gateway scope of the payment config file which is published to the config directory of your laravel file. You can provide the credentials from your service provider if you don't have yet. You don't need to define any other credentials if you don't plan to use another one. If yes. You can use each of payment gateway supported by the package by defining credentials on the related scope of the payment config file.

Payment class usage reference table
-----------------------------------

[](#payment-class-usage-reference-table)

Please check out the table given below to get basic knowledge of the Payment class behavior before using it.

  **Method Name** **Description** **Available gateways**   getCards Returns saved cards with given customer Sipay   saveCard Stores card information on the payment gateway host Sipay   updateCard Updates card information on the payment gateway host Sipay   deleteCard Deletes card information on the payment gateway host Sipay   payWith2D Start a 2D payment with given credit card for given customer info Sipay   payWith3D Start a 3D payment with given credit card for given customer info Sipay   payWithSavedCard Start a payment with stored credit card on the payment gateway host Sipay   verifyPayment Make a verification request for given payment Sipay   refund Start a refund process for given invoice Sipay   installmentInquiry Make an installment inquiry request for given credit card Sipay   transactionStatus Check all processed transaction's status Sipay > Hint: All methods accepts an array as parameter. You are not required to attach any credentials such as merchant\_id, app\_key, secret\_key thanks to the package service provider can attach the credentials automatically. Please check your payment gateway documentation to get further information about the required parameters of the endpoints.

Basic Usage Examples
====================

[](#basic-usage-examples)

1. getCards:

```
    // will return credit card resources
    Payment::gateway('sipay')
        ->getCards([
            'customer_number' => 123123
        ])->toArray();
```

2. saveCard:

```
    // will return credit card token
    Payment::gateway('sipay')
        ->saveCard([
            'card_number' => 4508034508034509,
            'customer_number' => 123123,
            'expiry_month' => 12,
            'expiry_year' => 2026,
            'card_holder_name' => 'Vedat Ünlü'
        ])->toArray();
```

3. payWith3D:

```
    // will return a html form body and this form will redirect to the 3D verification
    $response = Payment::gateway('sipay')
                    ->payWith3D([
                        'cc_holder_name' => 'Vedat Ünlü',
                        'cc_no' => '4508034508034509',
                        'expiry_month' => '12',
                        'expiry_year' => '2026',
                        'cvv' => '000',
                        'currency_code' => 'TRY',
                        'installments_number' => 1,
                        'invoice_id' => rand(100000, 999999),
                        'invoice_description' => 'invoice_description',
                        'name' => 'Vedat',
                        'surname' => 'Ünlü',
                        'total' => 101.10,
                        'items' => json_encode([
                            [
                                'name' => 'Item 2',
                                'price' => 101.10,
                                'quantity' => 1,
                                'description' => "item description"
                            ]
                        ]),
                        'cancel_url' => 'payment-success-callback-url', // route('payment.callback.success)
                        'return_url' => 'payment-error-callback-url', // route('payment.callback.error)
                        'response_method' => 'POST'
                    ]);

    if ($response->isSuccess() == true) {
        return $response->get3DSForm(); // get response as html form
    }

    return $response->toArray(); // get response as array
```

4. Validate Incoming Sipay Hash key:

You can easily validate hash keys returned from sipay gateway using Payment::validate($hashKey).

```
    $hashKey = $request->input('hash_key');

    if (!Payment::validate('sipay', $hashKey)) {
        return back()->with('error', 'Invalid hash key');
    }
```

This method returns array including status, total amount, invoice id, order id, currency code if key is valid. If not method will be returned false.

Contributing to the package
===========================

[](#contributing-to-the-package)

We welcome and appreciate your contributions to the package! The contribution guide can be found [here](https://github.com/vedatunlu/laravel-payment/blob/master/CONTRIBUTE.md).

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](https://github.com/vedatunlu/laravel-payment/blob/master/LICENSE).

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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

Recently: every ~28 days

Total

6

Last Release

973d ago

### Community

Maintainers

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

---

Top Contributors

[![vedatunlu](https://avatars.githubusercontent.com/u/49617126?v=4)](https://github.com/vedatunlu "vedatunlu (55 commits)")

---

Tags

laravel-paymentlaravel-sipaylaravel-virtual-possipaypaymentpaysipay

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vedatunlu-payment/health.svg)

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

###  Alternatives

[shetabit/multipay

PHP Payment Gateway Integration Package

291348.2k3](/packages/shetabit-multipay)[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4845.9k](/packages/sebdesign-laravel-viva-payments)[omnipay/payfast

PayFast driver for the Omnipay payment processing library

24626.9k3](/packages/omnipay-payfast)

PHPackages © 2026

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