Remaining of the file, had to split it because of this :/ The text that you have entered is too long (21080 characters). Please shorten it to 20000 characters long.
PHP Code:
if ( $awc_delete_user == 1 ){
$vbulletin->db->query_write("
DELETE FROM `".TABLE_PREFIX."awc_users`
WHERE userid = ".$payment_info['userid']."
AND sid = '".$payment_info['sid']."'
");
}
$vbulletin->db->query_write("
DELETE FROM `".TABLE_PREFIX."awc_payments`
WHERE txn_id = '".$payment_info['txn_id']."'
");
} else {
$payment_sql = $vbulletin->db->query_read("
SELECT txn_id, txn_type
FROM `".TABLE_PREFIX."awc_payments`
WHERE txn_id = '".$AWC['IN']['txn_id']."'
AND payment_status = '".$AWC['IN']['payment_status']."'
");
if ( $vbulletin->db->num_rows( $payment_sql ) == 0 && $AWC['IN']['userid'] > 0 ){
if ( $TRANS->var_check( 'payment_status', 'Completed' ) ){
$TRANS->updates();
}
if ( $vbulletin->options['awc_ns_en'] ){
if ( $TRANS->var_check( 'payment_status', 'Completed' ) ){
if ( $vbulletin->options['awc_ns_tt_en'] ){
$TRANS->notify_send( 'thanks', $AWC['IN']['userid'] );
}
} else {
if ( $vbulletin->options['awc_ns_ts_en'] ){
$TRANS->notify_send( 'status', $AWC['IN']['userid'] );
}
}
}
}
$db_string = null;
$db_string = $BASE->compile_db_update_string( $AWC['IN'] );
$vbulletin->db->query_write("
UPDATE `".TABLE_PREFIX."awc_payments`
SET ".$db_string."
WHERE txn_id = '".$AWC['IN']['txn_id']."'
");
}
}
}
}
//}
} else if ( !strcmp( $response, "INVALID" ) ){
if ( $vbulletin->options['awc_ns_en'] && $vbulletin->options['awc_ns_ti_en'] ){
$msg_rec_ids = explode( ",", $vbulletin->options['awc_ns_ti_rec'] );
foreach ( $msg_rec_ids AS $msg_rec_id ){
$TRANS->notify_send( 'invalid', $msg_rec_id );
}
}
} else {
}
fclose( $socket );
exit;
}
}
?>