REFUNDSTATUS should be a string, no? Have you tested this code?