1. Go to this page and download the library: Download omidgfx/payir-gateway library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
omidgfx / payir-gateway example snippets
$payir = new Omidgfx\Payir(
# api key
'API-KEY-STRING',
# language
Payir::LANGUAGE_FARSI // or Payir::LANGUAGE_ENGLISH
);
$response = $payir->send(
# total amount of the order
1000,
# callback url to your website
'https://myshop.com/verify?order=123',
# mobile number [optional]
'09121111111',
# factor number
'123',
# description of the order
'Some description',
# valid card number
'6219861012345678'
);