changed git call from https to git readonly
[atutor.git] / mods / ecomm / response_paypal_user.php
1 <?php
2 $_user_location = 'users';
3 define('AT_INCLUDE_PATH', '../../include/');
4 require(AT_INCLUDE_PATH.'vitals.inc.php');
5 require('include/payments.lib.php');
6 $transaction_id = $addslashes($_REQUEST['tx']);
7 $payment_id = intval($_REQUEST['item_number']);
8
9 if ($_GET['st'] == "Completed"){
10
11         approve_payment($payment_id, $transaction_id);
12         $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');
13
14 } else if ($_GET['st'] == "Pending"){
15         approve_payment($payment_id, $transaction_id);
16         $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');
17         $msg->addFeedback('ACTION_PENDING_CC_CONFIRM');
18
19 }else {
20         $msg->addError('EC_PAYMENT_FAILED');
21 }
22
23 //print_r($_GET);
24 header('Location: index.php');
25 exit;
26 ?>