uawdijnntqw1x1x1
IP : 216.73.216.55
Hostname : panel.codeskitter.com
Kernel : Linux panel.codeskitter.com 6.8.0-100-generic #100-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 13 16:40:06 UTC 2026 x86_64
Disable Function : apache_child_terminate, apache_note, apache_setenv, define_syslog_variables, dl, link, opcache_get_status, openlog, pcntl_exec, pcntl_fork, pcntl_setpriority, popen, posix_getpwuid, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid
OS : Linux
PATH:
/
home
/
users
/
unlimited
/
www
/
facebook.codeskitter.site
/
api
/
v2
/
endpoints
/
payfast.php
/
/
<?php require_once 'assets/libraries/payfastSDK/vendor/autoload.php'; use PayFast\PayFastPayment; $response_data = array( 'api_status' => 400 ); $required_fields = array( 'load', ); if (!empty($_POST['type']) && in_array($_POST['type'], $required_fields)) { if ($_POST['type'] == 'load') { try { payFastLoadValidation(); $amount = Wo_Secure($_POST['amount']); $payfast = new PayFastPayment( [ 'merchantId' => $wo['config']['payfast_merchant_id'], 'merchantKey' => $wo['config']['payfast_merchant_key'], 'passPhrase' => '', 'testMode' => ($wo['config']['payfast_mode'] == 'sandbox') ? true : false ] ); $callback_url = $wo['config']['site_url'] . "/requests.php?f=payfast&s=wallet&amount=".$amount."&user_id=".$wo['user']['user_id']; $data = [ // Merchant details 'return_url' => $callback_url, 'cancel_url' => $callback_url, 'notify_url' => $callback_url, 'amount' => $amount, 'item_name' => 'Wallet' ]; $htmlForm = $payfast->custom->createFormFields($data, ['value' => 'PLEASE PAY', 'class' => 'button-cta']); $data['api_status'] = 200; $data['html'] = $htmlForm; $response_data = $data; } catch (Exception $e) { $error_code = 5; $error_message = $e->getMessage(); } } elseif ($_POST['type'] == 'wallet') { try { payFastLoadValidation(); $amount = Wo_Secure($_POST['amount']); $payfast = new PayFastPayment( [ 'merchantId' => $wo['config']['payfast_merchant_id'], 'merchantKey' => $wo['config']['payfast_merchant_key'], 'passPhrase' => '', 'testMode' => ($wo['config']['payfast_mode'] == 'sandbox') ? true : false ] ); $notification = $payfast->notification->isValidNotification($_POST, ['amount_gross' => $amount]); if($notification === true) { $db->where('user_id', $wo['user']['user_id'])->update(T_USERS, array( 'wallet' => $db->inc($amount) )); cache($wo['user']['user_id'], 'users', 'delete'); $create_payment_log = mysqli_query($sqlConnect, "INSERT INTO " . T_PAYMENT_TRANSACTIONS . " (`userid`, `kind`, `amount`, `notes`) VALUES ('" . $wo['user']['user_id'] . "', 'WALLET', '" . $amount . "', 'payfast')"); $user = Wo_UserData($wo['user']['user_id']); $response_data = array( 'api_status' => 200, 'message' => 'payment successfully done', 'wallet' => $user['wallet'], 'balance' => $user['balance'], ); } else { throw new Exception("something went wrong"); } } catch (Exception $e) { $error_code = 5; $error_message = $e->getMessage(); } } } else{ $error_code = 4; $error_message = 'type can not be empty'; }
/home/users/unlimited/www/facebook.codeskitter.site/api/v2/endpoints/payfast.php