Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/code4mk/lara-sslcommerz
Laravel sslcommerz payment . SSLCOMMERZ is a bangladeshi payment gateway provider.
https://github.com/code4mk/lara-sslcommerz
bd-payment laravel laravel-package laravel-sslcommerz laravel-sslcommerz-payment sslcommerz sslcommerz-laravel sslcommerz-payment-gateway
Last synced: 2 days ago
JSON representation
Laravel sslcommerz payment . SSLCOMMERZ is a bangladeshi payment gateway provider.
- Host: GitHub
- URL: https://github.com/code4mk/lara-sslcommerz
- Owner: code4mk
- Created: 2020-05-31T21:02:29.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-07-02T14:48:34.000Z (5 months ago)
- Last Synced: 2024-08-09T08:52:49.390Z (3 months ago)
- Topics: bd-payment, laravel, laravel-package, laravel-sslcommerz, laravel-sslcommerz-payment, sslcommerz, sslcommerz-laravel, sslcommerz-payment-gateway
- Language: PHP
- Homepage:
- Size: 32.2 KB
- Stars: 10
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
customer('kamal212')
->amount(100)
->emi(4,5,1)
->getRedirectUrl();if( $data->failedreason == "") {
$link = $data->GatewayPageURL;
return response()->json($link);
}else{
// your code
return response()->json($data->failedreason);
}
```## methods
* emi($max_inst = '',$selected_inst = '',$allow_only = '')
* customer($name = '', $email = '', $phone = '', $add1 = '', $city = '', $post_code = '', $country = '')# verify payment (`post method`) - success URL
```bash
http://127.0.0.1:8000/success
``````php
use SslPayment;
$data = SslPayment::verify(request());
// return response()->json($data);
if ($data->status == 'VALID') {
// your business logic
}
```# ipn payment verify
create a post route for ipn and csrf free
* [ipn doc sslcommerz](https://developer.sslcommerz.com/doc/v4/#validate-payment-with-ipn)
```php
/* you can get success objects which triggers by sslcomerz.
you can
*/
Route::post('ipn',function(){
return response()->json(request());
})
```# csrf
* enable csrf free for your success route
ex : (VerifyCsrfToken.php)
```php
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
class VerifyCsrfToken extends Middleware
{
/**
* The URIs that should be excluded from CSRF verification.
*
* @var array
*/
protected $except = [
'/success',
'/ipn'
];
}```
# Any query