2017 © Pedro Peláez
 

laravel-package savano

Savano Payment Gateway For Laravel

image

kpasokhi/savano

Savano Payment Gateway For Laravel

  • Tuesday, February 13, 2018
  • by kpasokhi
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Savano Payment

Savano Payment Gateway For Laravel, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require kpasokhi/savano

or add, (*4)

"kpasokhi/savano": "1.*"

to the require section of your composer.json file., (*5)

How to use this extension

For example, imagine that you have a controller called this PaymentController at first you need 2 actions, one of them is for request payment and another is verify payment., (*6)

You need to use an storage to save your payments and payments status., (*7)

PaymentController.php, (*8)

..... 

<?php
public function actionRequest()
{
    /* Your Data */
    $pin      = 'Your Pin';
    $callback = 'Your Callback Url';

    /* Save Price, OrderId and Authority In Your Storage */
    $price    = 1000;
    $orderId  = 1;

    $savano = new Savano;
    $savano->pin = $pin;

    if($request = $savano->request($price, $orderId, $callback)->getResult() === 1)
    {
        // $authority = $savano->getAuthority();
        // You can save your payment request data to the database in here before redirect user to bank

        return $this->redirect($savano->getRedirectUrl());
    }
    else
    {
        // Show Error.
        echo $savano->getErrorMessage();
    }
}

public function actionVerify()
{
    $pin = 'Your Pin';

    /* Fetch Price, OrderId and Authority From Your Storage */
    $authority = 'xxxxxxxxxxxxxxx';
    $price     = 1000;
    $orderId   = 1;

    $savano = new Savano;
    $savano->pin = $pin;

    if($verify = $savano->verify($authority, $price, $orderId)->getResult() === 1)
    {
        // Payment Successfully
    }
    else
    {
        // Show Error
        echo $savano->getErrorMessage();
    }
}

.....

The Versions

13/02 2018

dev-master

9999999-dev

Savano Payment Gateway For Laravel

  Sources   Download

MIT

The Requires

 

by Amir Khoshhal
by Koorosh Pasokhi

payment online persian iran savano

13/02 2018

1.0

1.0.0.0

Savano Payment Gateway For Laravel

  Sources   Download

MIT

The Requires

 

by Amir Khoshhal
by Koorosh Pasokhi

payment online persian iran savano