Skip to content

Commit d94a94b

Browse files
committed
ipn verify
1 parent 019b9e2 commit d94a94b

File tree

1 file changed

+47
-5
lines changed

1 file changed

+47
-5
lines changed

README.md

Lines changed: 47 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<p align="center" ><img src="https://raw.githubusercontent.com/code4mk/lara-sslcommerz/master/ssl.PNG"></p
22
3-
# SSLcommerz
43
5-
Sslcomers is the Bangladeshi most favorite payment gateway.
4+
SslCommerz is the Bangladeshi most favorite payment gateway.
65
76
# Installation
87
@@ -55,6 +54,12 @@ if( $data->failedreason == "") {
5554
}
5655
```
5756
57+
## methods
58+
59+
* emi($max_inst = '',$selected_inst = '',$allow_only = '')
60+
* customer($name = '', $email = '', $phone = '', $add1 = '', $city = '', $post_code = '', $country = '')
61+
*
62+
5863
# verify payment (`post method`)
5964
6065
```php
@@ -64,10 +69,47 @@ if ($data->status == 'VALID') {
6469
// your business logic
6570
}
6671
```
67-
#
6872

69-
```bash
70-
php artisan vendor:publish --provider="Code4mk\SslCommerz\SslcommerzServiceProvider" --tag=config
73+
#ipn payment verify
74+
75+
create a post route for ipn and csrf free
76+
77+
* [ipn doc sslcommerz](https://developer.sslcommerz.com/doc/v4/#validate-payment-with-ipn)
78+
79+
```php
80+
/* you can get success objects which triggers by sslcomerz.
81+
you can
82+
*/
83+
Route::post('ipn',function(){
84+
return response()->json(request());
85+
})
86+
```
87+
88+
# csrf
89+
90+
* enable csrf free for your success route
91+
92+
ex : (VerifyCsrfToken.php)
93+
94+
```php
95+
96+
namespace App\Http\Middleware;
97+
98+
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
99+
100+
class VerifyCsrfToken extends Middleware
101+
{
102+
/**
103+
* The URIs that should be excluded from CSRF verification.
104+
*
105+
* @var array
106+
*/
107+
protected $except = [
108+
'/success',
109+
'/ipn'
110+
];
111+
}
112+
71113
```
72114

73115
# Demo

0 commit comments

Comments
 (0)