javad / ir-kish
a package for using iran kish gateway
Installs: 9
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 1
Forks: 0
Open Issues: 0
Type:payment
This package is auto-updated.
Last update: 2024-09-10 14:11:24 UTC
README
a simple package for usnig irankish gateway.
پکیج درگاه پرداخت ایران کیش برای لاراول
Installation
Use the composer to install irankish-laravel.
composer require javad/ir-kish
publish config file
php artisan vendor:publish --provider=MJSeydi\iranKish\IranKishServiceProvider
Usage
use MJSeydi\iranKish\Facades\IranKish; # getting the token from irankish # you must save $orderId in your database for verify the payment $response = IranKish::getIranKishToken($Amount,$orderId); if ($response["responseCode"] != "00") { # you have error! }else{ $token = $response['result']['token']; # in you view you must have a form like this /* <form action="https://ikc.shaparak.ir/iuiv3/IPG/Index/" method="POST"> <input type="hidden" name="tokenIdentity" value="{{$token}}" /> <input type="submit" value="ورود به درگاه پرداخت" /> </form> */ }
verify payment
use MJSeydi\iranKish\Facades\IranKish; # all parameter will send to you by POST method $response = IranKish::verifyPayment($request->verifySaleReferenceId, $request->systemTraceAuditNumber, $request->token); #your order id is on the $request->orderId if ($response["responseCode"] != 0 && $response["responseCode"] != "00") { # you have error! }else{ echo "success"; }
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.