Skip to content

پکیج درگاه پرداخت ایران کیش برای لاراول

Notifications You must be signed in to change notification settings

mrjavadseydi/irankish-laravel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

laravel iran kish payment package

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.

About

پکیج درگاه پرداخت ایران کیش برای لاراول

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages