-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathresponse.php
45 lines (39 loc) · 1.71 KB
/
response.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
34
35
36
37
38
39
40
41
42
43
44
45
<?php
/*Created by saqib 18-08-2009*/
$PaymentID = $_POST['paymentid'];
$presult = $_POST['result'];
$postdate = $_POST['postdate'];
$tranid = $_POST['tranid'];
$auth = $_POST['auth'];
$ref = $_POST['ref'];
$trackid = $_POST['trackid'];
$udf1 = $_POST['udf1'];
$udf2 = $_POST['udf2'];
$udf3 = $_POST['udf3'];
$udf4 = $_POST['udf4'];
$udf5 = $_POST['udf5'];
if ( $presult == "CAPTURED" )
{
$result_url = "https://www.knetpaytest.com.kw/php/result.php";
$result_params = "?PaymentID=" . $PaymentID . "&Result=" . $presult . "&PostDate=" . $postdate . "&TranID=" . $tranid . "&Auth=" . $auth . "&Ref=" . $ref . "&TrackID=" . $trackid . "&UDF1=" . $udf1 . "&UDF2=" .$udf2 . "&UDF3=" . $udf3 . "&UDF4=" . $udf4 . "&UDF5=" . $udf5 ;
/* $SQL1 = "UPDATE `knet_invoice` SET paid=1 WHERE paymentid='".$paymentid."'";
if ( !mysql_query( $SQL1 ) )
{
exit( "Fatal Error: ".mysql_error( ) );
}
include( "tpl/email.php" );
if ( trim( $client_email ) != "" )
{
mail( "", EMAIL_SUBJECT, $_email_msg, $_email_headers );
}
$_email_headers = "From: ".EMAIL_FROM." <".EMAIL_EMAIL.">\nX-Mailer: PHP/".phpversion( )."\nMIME-Version: 1.0\nContent-type: text/html; charset=utf-8\n";
mail( KNET_ADME, EMAIL_SUBJECT, $_email_msg, $_email_headers );
*/
}
else
{
$result_url = "https://www.knetpaytest.com.kw/php/error.php";
$result_params = "?PaymentID=" . $PaymentID . "&Result=" . $presult . "&PostDate=" . $postdate . "&TranID=" . $tranid . "&Auth=" . $auth . "&Ref=" . $ref . "&TrackID=" . $trackid . "&UDF1=" . $udf1 . "&UDF2=" .$udf2 . "&UDF3=" . $udf3 . "&UDF4=" . $udf4 . "&UDF5=" . $udf5 ;
}
echo "REDIRECT=".$result_url.$result_params;
?>