refund purchase functional