appoets/larvel-omnipay-payubiz

Laravel package for PayUBiz payment gateway with Omnipay

dev-master 2016-11-24 16:42 UTC

This package is not auto-updated.

Last update: 2024-04-22 13:57:44 UTC


README

Laravel package for PayUBiz payment gateway with Omnipay.

Install

Via Composer

$ composer require appoets/omnipay-payubiz

Usage

Configuration

$PayU = OmniAuth::create('PayUBiz');
$PayU->setKey(MERCHANT_ID);
$PayU->setSalt(PAYU_SALT);

$PaymentDetails = [
    'name' => $user->name,
    'first_name' => $user->first_name,
    'last_name' => $user->last_name,
    'email' => $user->email,
    'amount' => $product->amount,
    'product' => $product->name,
    'curl' => url('api/payment/cancelled'),
    'furl' => url('api/payment/failed'),
    'surl' => url('api/payment/success')
];

$PayU->purchase($PaymentDetails)->send()->redirect();

Check official OmniPay documentation for more

Credits

License

The MIT License (MIT). Please see License File for more information.