-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnotify_donate.php
More file actions
31 lines (25 loc) · 1.22 KB
/
Copy pathnotify_donate.php
File metadata and controls
31 lines (25 loc) · 1.22 KB
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
<?php
/**************************************************************************
* This file is part of Blue Material Admin (SourceBans++ fork).
*
* Licensed under the GNU General Public License v3.0 or later.
* See LICENSE and NOTICE in the project root.
*
* UI theme under themes/new_box has separate provenance — see NOTICE.
***************************************************************************/
require_once('init.php');
$pay_service__file = sprintf("%s/pay_services/%s.php", INCLUDES_PATH, $GLOBALS['config']['autodonate.main.payment_service']);
if (!file_exists($pay_service__file))
die(sprintf("SourceBans Autodonate Fatal Error: No such file with pay service %s.", $GLOBALS['config']['autodonate.main.payment_service']));
require_once($pay_service__file);
if (!class_exists($GLOBALS['config']['autodonate.main.payment_service']))
die("Not found service class.");
/* Prepare Billing instance */
$BILLING = new CDonate();
$service = new $GLOBALS['config']['autodonate.main.payment_service']($BILLING);
if (!$service->isValidPayment())
die("Invalid Payment data.");
$id = $service->getPaymentId();
if (!$id)
die("ID is not valid.");
$BILLING->fireEvent('onPaymentSuccessfull', array($service, $id));