You need to use Before Ticket Closing Event. Total Amount is not available in Payment Processed - only Processed Amount.
Before Ticket Closing