Ok - read your error message again - I don't think you can do what you are wanting. I believe there's actually a "sub" transaction called "external payment event" - this occurs with your CC processor. Which your script is trying to set a text value for a list/record type field.