switch isAllowRefund to isRefundAllowed and make shallow comparison