alaaelsaid / laravel-urway-payment
This package is to integrate with URWay payment
1.3.2
2024-03-31 12:05 UTC
Requires
- php: ^8.1
README
Installation
You can install the package via Composer.
composer require alaaelsaid/laravel-urway-payment
Publishing
After install publish file config
php artisan vendor:publish --tag="urway"
Env
In the .env file you can add those keys:
URWAY_TERMINAL_ID= URWAY_PASSWORD= URWAY_MERCHANT_SECRET_KEY= URWAY_CURRENCY=SAR # in the development mode set it 'dev' in # else in production mode set it 'live' URWAY_STATUS=dev
Usage
use Alaaelsaid\LaravelUrwayPayment\Facade\Urway; $payment_url = Urway::getPaymentUrl([ 'trackid' => 1, 'email' => 'email@example.com', 'amount' => 500, 'redirect_url' => route('payment.success'), // put your redirect url here, feel free to use url() method, 'udf3' => '', // optional if you want to get extra data in redirection, 'udf4' => '', // optional if you want to get extra data in redirection, 'udf5' => '', // optional if you want to get extra data in redirection, ]); return redirect($payment_url); // this is for example !!