Giter Site home page Giter Site logo

evryn / laravel-toman Goto Github PK

View Code? Open in Web Editor NEW
89.0 3.0 18.0 1011 KB

💰 Elegant IDPay and Zarinpal gateway for Laravel

Home Page: https://evryn.github.io/laravel-toman/

License: MIT License

PHP 100.00%
laravel payment zarinpal shetab idpay payment-gateways

laravel-toman's Introduction

Laravel Toman

A painless payment handler!

Latest Version on Packagist Total Downloads Build Status Code Coverage StyleCI

📚 Read documents and start using in <5m

داکیومنت فارسی رو بخونین و تو 5 دقیقه استفاده‌اش کنین 📚

About Toman (تومَن)

Toman is a Laravel package which makes working with popular payment gateways much easier.

Supported Gateways

Zarinpal.com
IDPay.ir
🔘 YekPay.com
🔘 Pay.ir
🔘 PayPing.ir
🔘 ...

Simple to use

Request a new payment:

Request new Payment

And simply verify its callback:

Verify Payment

How to start?

📚 Read documents and get started now!

How to contribute?

Start with the contributing guidelines and code of conduct. Got any question? Create a new discussion and I'll be right there :)

laravel-toman's People

Contributors

amirrezanasiri avatar jalallinux avatar stylecibot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

laravel-toman's Issues

[BUG]: Two method are not existing for zarinpal driver, and only work on idpay.

Hello @AmirrezaNasiri ✌🏻

Describe the bug
Two method are not existing for zarinpal driver, and only work on idpay.

To Reproduce
Steps to reproduce the behavior:

  1. Set default gateway to zarinpal in config/toman.php
  2. Create Toman request:
 Toman::amount(10000)
            ->orderId('123')
            ->mobile('a valid mobile number')
            ->email('a valid email')
            ->callback('a valid site route')
            ->description('description of this payment')
            ->name('JalalLinuX')
            ->request();
  1. See exception:
Method Evryn\\LaravelToman\\PendingRequest::orderId does not exist.
  1. Now comment ->orderId('123')
 Toman::amount(10000)
            // ->orderId('123')
            ->mobile('a valid mobile number')
            ->email('a valid email')
            ->callback('a valid site route')
            ->description('description of this payment')
            ->name('JalalLinuX')
            ->request();
  1. See exception:
Method Evryn\\LaravelToman\\PendingRequest::name does not exist.

Expected behavior
This package a multi pay driver package and it should have the same usage. but orderId, name method only work for idpay driver.

Screenshots
Screen Shot 1400-07-22 at 17 21 16
Screen Shot 1400-07-22 at 17 26 13

Exact Versions:

  • Laravel: 8.54
  • PHP: 7.4
  • Package: 2.0.1

[Help] `orderId` does not exist

hi thanks for your package
when try to create request
show this error
Method Evryn\LaravelToman\PendingRequest::orderId does not exist.
?

Add gate config for Zarinpal

It should allow following settings:

  • default: Default wegtate
  • zaringate: Direct gate to proper bank gateway
  • string: Use the bank gateway strictly. Must get details from zarinpal itself

Call to undefined method Evryn\LaravelToman\Exceptions\GatewayException::getStatus()

example provided on the documentation is as below :

try {
    $verifiedPayment = PaymentVerification::amount(1000)
        ->verify(request()); // or $request in your Controller
} catch (GatewayException $gatewayException) {
    if ($gatewayException->getStatus() === Status::NOT_PAID) {
        // the payment has been cancelled
    } elseif ($gatewayException->getStatus() === Status::ALREADY_VERIFIED) {
        // the payment has already been verified before
    }
} catch (InvalidConfigException $exception) {
    // Woops! wrong merchant_id or sandbox option is configurated.
}

but GatewayException is empty and hasn't any functions to return the exceptions and getStatus method. so when verification catches some errors it can't check the status by GatewayException class.

[BUG] support laravel 9

Problem 1

  • illuminate/support[v7.0.0, ..., v7.28.4] require php ^7.2.5 -> your php version (8.1.1) does not satisfy that requirement.
  • illuminate/support[v8.0.0, ..., v8.11.2] require php ^7.3 -> your php version (8.1.1) does not satisfy that requirement.
  • Root composer.json requires evryn/laravel-toman ^2.0 -> satisfiable by evryn/laravel-toman[v2.0.0, v2.0.1, 2.x-dev].
  • Conclusion: don't install laravel/framework v9.0.0-beta.2 (conflict analysis result)
  • Conclusion: don't install laravel/framework v9.0.0-beta.3 (conflict analysis result)
  • Conclusion: don't install laravel/framework v9.0.0-beta.4 (conflict analysis result)
  • Conclusion: don't install laravel/framework v9.0.0-beta.5 (conflict analysis result)
  • Conclusion: don't install laravel/framework v9.0.0 (conflict analysis result)
  • Conclusion: don't install laravel/framework v9.0.1 (conflict analysis result)
  • Conclusion: don't install laravel/framework v9.0.2 (conflict analysis result)
  • Conclusion: don't install laravel/framework v9.1.0 (conflict analysis result)
  • Conclusion: don't install laravel/framework v9.2.0 (conflict analysis result)
  • Conclusion: don't install laravel/framework v9.3.0 (conflict analysis result)
  • Conclusion: don't install laravel/framework v9.3.1 (conflict analysis result)
  • Conclusion: don't install laravel/framework v9.0.0-beta.1 (conflict analysis result)
  • evryn/laravel-toman[v2.0.0, ..., 2.x-dev] require illuminate/support ^7.0|^8.0 -> satisfiable by illuminate/support[v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev].
  • Only one of these can be installed: illuminate/support[v5.6.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev, v9.0.0-beta.1, ..., 9.x-dev], laravel/framework[v9.0.0-beta.1, ..., 9.x-dev]. laravel/framework replaces illuminate
    /support and thus cannot coexist with it.
  • Root composer.json requires laravel/framework ^9.0 -> satisfiable by laravel/framework[v9.0.0-beta.1, ..., 9.x-dev].

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.