2017 © Pedro Peláez
 

library webxpay-laravel

Webxpay laravel package

image

isurindu/webxpay-laravel

Webxpay laravel package

  • Monday, July 2, 2018
  • by isurindu
  • Repository
  • 1 Watchers
  • 2 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

Webxpay Laravel

Latest Stable Version Total Downloads License, (*1)

Installation

You can install the package via composer:, (*2)

composer require isurindu/webxpay-laravel

In Laravel 5.5 the service provider will automatically get registered. In older versions of the framework just add the service provider in config/app.php file:, (*3)

'providers' => [
    // ...
    Isurindu\WebxpayLaravel\WebxpayServiceProvider::class,
];

You can publish config and views, (*4)

php artisan vendor:publish --provider="Isurindu\WebxpayLaravel\WebxpayServiceProvider"

Usage

in route, (*5)

Route::get('payment/{ORDER_ID}', 'PaymentController@index');
Route::post('payment/verify', 'PaymentController@verify');

in App/Http/Middleware/VerifyCsrfToken.php, (*6)

<?php

namespace App\Http\Middleware;

use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;

class VerifyCsrfToken extends Middleware
{
    /**
     * The URIs that should be excluded from CSRF verification.
     *
     * @var array
     */
    protected $except = [
        'payment/verify'
    ];
}

in controller, (*7)

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Isurindu\WebxpayLaravel\Facades\Webxpay;

class PaymentController extends Controller
{

    public function store(Request $request)
    {

            return Webxpay::redirect([
                'order_id'=>'102',
                'price'=>'100',
                'first_name'=>'isurindu',
                'last_name'=>'prabashwara',
                'email'=>'hello@isurindu.com',
                'contact_number'=>'',
                'address_line_one'=>'',
                'cms'=>'laravel',
                'process_currency'=>'LKR',
                'custom_fields'=>'',
                'city'=>'',
                'state'=>'',
                'postal_code'=>'',
                'country'=>'',
            ]);

    }
    public function verify(Request $request)
    {
        return dd(Webxpay::verify());
    }
}

The Versions

02/07 2018

dev-master

9999999-dev

Webxpay laravel package

  Sources   Download

MIT

by isurindu prabashwara

02/07 2018

v1.4

1.4.0.0

Webxpay laravel package

  Sources   Download

MIT

by isurindu prabashwara

02/07 2018

v1.3

1.3.0.0

Webxpay laravel package

  Sources   Download

MIT

by isurindu prabashwara

02/07 2018

v1.2

1.2.0.0

Webxpay laravel package

  Sources   Download

MIT

by isurindu prabashwara

30/06 2018

v1.1

1.1.0.0

Webxpay laravel package

  Sources   Download

MIT

by isurindu prabashwara

29/06 2018

v1.0

1.0.0.0

Webxpay laravel package

  Sources   Download

MIT

by isurindu prabashwara