change pending_invoice method in merchant