paysky/payment

dev-main 2023-08-01 14:54 UTC

This package is auto-updated.

Last update: 2025-03-31 15:06:24 UTC


README

Installation

Require via composer

$ composer require paysky/payment

In config/app.php file

'providers' => [
    ...
    PaySky\Payment\Providers\PaySkyPaymentServiceProvider::class,
    ...
];


'aliases' => [
    ...
    'PaySky' => PaySky\Payment\Facades\PaySky::class,
    ...
];

First of all, make an account on paysky - run this command to generate the PaySky configuration file and choose the package

$ php artisan vendor:publish  

add configurations to your .env file and

PaySky_MerchantSecretKey= XXXXX
PaySky_MerchantId= XXXXX
PaySky_TerminalId= XXXXX
PaySky_Enviroment= sandbox-production   

In Controller init new payment class add amount - oderId - merchRef

$payment = PaySky::makePayment(100000 , rand() );

add payment button in your checkout page

@include('paysky::index')

tanslation key for btn

paysky.paybtn

pass payment variable to view have button link

return view('welcome' ,  ['payment' => $payment ]  );

all amount by small curruncy ()