Fixed compile errors, added helpe methods for statuses, and made UpdatePaymentStatus infer whether the payment is completed or not.