https://github.com/md-asifiqbal/sam-sslcommerz-
SSLCOMMERZ is the largest payment gateway aggregator in Banglades
https://github.com/md-asifiqbal/sam-sslcommerz-
bangladesh-payment laravel payment-gateway sslcommerz
Last synced: 3 months ago
JSON representation
SSLCOMMERZ is the largest payment gateway aggregator in Banglades
- Host: GitHub
- URL: https://github.com/md-asifiqbal/sam-sslcommerz-
- Owner: md-asifiqbal
- Created: 2021-10-28T06:41:25.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-10-29T06:09:06.000Z (over 3 years ago)
- Last Synced: 2025-01-13T07:12:34.082Z (5 months ago)
- Topics: bangladesh-payment, laravel, payment-gateway, sslcommerz
- Language: PHP
- Homepage:
- Size: 21.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SSLCommerz
[SSLCommerz](https://www.sslcommerz.com) Payment gateway library for Laravel framework. Official documentation is [here](https://developer.sslcommerz.com/docs.html).## install
```
composer require sam-asif/sslcommerz
```## Provider
You need to update your application configuration in order to register the package so it can be loaded by Laravel, just update your `config/app.php` file adding the following code at the end of your `'providers'` section:
> `config/app.php`
```php
[
SamAsif\Sslcommerz\SSLCommerzServiceProvider::class,
// ...
],
// ...
];
```### publish
```
php artisan vendor:publish
```
This command will create a `sslcommerz.php` file inside the `config` directory. Configure your parameters in your `.env` fileIf your request value contain following key
```
total_amount
currency
tran_id
cus_name
cus_email
cus_add1
cus_add2
cus_city
cus_state
cus_postcode
cus_country
cus_phone
cus_fax
ship_name
ship_add1
ship_add2
ship_city
ship_state
ship_postcode
ship_phone
ship_country
shipping_method
product_name
product_category
product_profile
value_a
value_b
value_c
value_d
```Then just call the controller method.
```php
index($request, 'hosted');if (!is_array($payment_options)) {
print_r($payment_options);
$payment_options = array();
}}
}
```
If your request value dostn't contain those key, then define an array with those key and call the controller function.
```php
index($post_data, 'hosted');if (!is_array($payment_options)) {
print_r($payment_options);
$payment_options = array();
}}
// For received return value
public function return(Request $request){
return $request->all();
}}
```
### Web Route
```
Route::post('/sslcommerz/return', 'OrderController::class@return')->name('sslcommerz.return');```
This route for the received the return value from SSLCommerz gateway.