-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
33 lines (25 loc) · 1.02 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
ini_set('display_errors',true);
require 'vendor/autoload.php';
use \Gateways\Gateway\Zarinpal\Zarinpal;
use \Gateways\Gateway\Classes\Persistent;
if(isset($_REQUEST['data'])){
$persistent = new Persistent();
$data = $persistent->load($_REQUEST['extra']);
$gateway = new Zarinpal(
[
'wsdlLink' => 'https://ir.zarinpal.com/pg/services/WebGate/wsdl',
'forwardUrl'=> 'https://www.zarinpal.com/pg/StartPay/',
'MerchantID'=> '5e3fcc96-d416-11e5-9ffc-000c295eb8fc',
], $persistent);
echo $gateway->verify($data+$_REQUEST);die();
}
$gateway = new Zarinpal(
[
'wsdlLink' => 'https://ir.zarinpal.com/pg/services/WebGate/wsdl',
'forwardUrl'=> 'https://www.zarinpal.com/pg/StartPay/',
'MerchantID'=> '5e3fcc96-d416-11e5-9ffc-000c295eb8fc',
], new Persistent());
$gateway->request('http://37.98.114.210:50780/GatewayManagement/?data=sajad',5,100,['Email'=>'s@gmail.com']);
var_dump($gateway->getForwardUrl());
var_dump($gateway->getParams());