Download the PHP package elshaden/laravel-tlync without Composer
On this page you can find all versions of the php package elshaden/laravel-tlync. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download elshaden/laravel-tlync
More information about elshaden/laravel-tlync
Files in elshaden/laravel-tlync
Package laravel-tlync
Short Description Laravel SKD for Tlync Payment Gateway
License MIT
Homepage https://github.com/Elshaden/laravel-tlync
Informations about the package laravel-tlync
Laravel SKD for Tlync Payment Gateway
From Tadawul Digital Solutions Provider , (TDSP)
Overview
This Package is a Laravel SDK for Tlync Payment gateway you can read more about Tlync API here Tlync API Documentation
To use this package you must have an account on Tlync and have your API Key and API Secret
You Also need to create a temporary table in your database to store the new orders before sending them to Tlync This will help in making sure that any completed and paid orders are not sent again to Tlync. and also to make sure that Tlync will only receive unique orders.
How it works
- Customer places and order on your website, or cart
- You create a new order in your temporary table in data database
- You send the order to Tlync as will be explained below
- Tlync will send a callback to your website with the order status
- if the order is paid, you can now create the order in your database and send the customer to the success page
- and delete the temporary order from your temporary table or mark it as paid
- if the order is not paid, you can send the customer to the failed page and delete the order from your temporary table
Installation
You can install the package via composer:
You must publish the config file with:
This is the contents of the published config file:
* public function confirm($order, $request){
* // Change order from temporary to orders and deliver the order.
* }
*
And Also publishes the Hashids file, if you already have that, please add the custom connections to your file The hashids config is responsible for providing a hashed id for the temporary order id, so the customer will not see the real order id
Usage
Initiate Payment
Initiate Payment Response and Redirect
Success Response
if the initiate payment is successful, you will get a response in array
You should Redirect the customer to the url provided in the response
if the initiate payment is not successful, you will get a response in array
Call Back
This is when Tlync sends a call back to your server Backend with the payment status The route set in the config file will receive the POST call back and will handle it in the Tlync Controller
The verification of the call back is done by Tlync Callback Method, so you do not need to worry about that.
When all is done this package will call the class you set up in the config file
passing to it the Parameters you sent to the Initiate and the Tlync Response
To learn more about the Tlync Response please check the Tlync Documentation
You will need to handel the call back in your own class and method, and do what ever you want with it Normally if success you will need to create the order in your database and send the customer to the success page and if failed you will need to send the customer to the failed page
You can create your own class and method to handle the call back, and add it to the config file
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-tlync with dependencies
illuminate/contracts Version ^9.0|^10.0|^11.0
hashids/hashids Version ^4.1|^5.0