For some reason transaction_user_id was returning

For some reason transaction_user_id was returning 0 whenever a payment was made. I had to set the var to $data['transaction_user_ID'] = get_current_user_id(); to get the correct user id to post once payment was made. Any ideas?